From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752380AbdK2WpY (ORCPT ); Wed, 29 Nov 2017 17:45:24 -0500 Received: from mga02.intel.com ([134.134.136.20]:34278 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751771AbdK2WpX (ORCPT ); Wed, 29 Nov 2017 17:45:23 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,339,1508828400"; d="scan'208";a="154507932" Date: Wed, 29 Nov 2017 14:45:21 -0800 From: Andi Kleen To: Paolo Bonzini Cc: Wanpeng Li , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Radim =?utf-8?B?S3LEjW3DocWZ?= , Wanpeng Li , Jim Mattson Subject: Re: [PATCH] KVM: VMX: Cache IA32_DEBUGCTL in memory Message-ID: <20171129224521.GF3070@tassilo.jf.intel.com> References: <1511935673-7371-1-git-send-email-wanpeng.li@hotmail.com> <87fu8xj69o.fsf@linux.intel.com> <5045320c-3036-4e08-140e-4bb5cf78be24@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5045320c-3036-4e08-140e-4bb5cf78be24@redhat.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 29, 2017 at 11:26:30PM +0100, Paolo Bonzini wrote: > On 29/11/2017 19:20, Andi Kleen wrote: > > But I haven't looked too closely, but I suspect you'll clobber global > > kernel debugger state this way. > > I checked all callers of update_debugctlmsr, and couldn't find any that > could run asynchronously while KVM is caching the value. For example > __switch_to_xtra would always run before the sched_in notifier. True. It would only be a problem if the debugger supported branch stepping or LBRs, which it doesn't seem to currently. -Andi