From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [PATCH] KVM: VMX: Cache IA32_DEBUGCTL in memory Date: Wed, 29 Nov 2017 14:45:21 -0800 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 Cc: Wanpeng Li , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Radim =?utf-8?B?S3LEjW3DocWZ?= , Wanpeng Li , Jim Mattson To: Paolo Bonzini Return-path: 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 Content-Disposition: inline In-Reply-To: <5045320c-3036-4e08-140e-4bb5cf78be24@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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