From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiaoyao Li Subject: Re: [PATCH v4 15/17] kvm: x86: Report CORE_CAPABILITY on GET_SUPPORTED_CPUID Date: Mon, 04 Mar 2019 19:21:06 +0800 Message-ID: <5a9b82659ace27ea03b3c16fc91fdad03fbc32ea.camel@linux.intel.com> References: <1551494711-213533-1-git-send-email-fenghua.yu@intel.com> <1551494711-213533-16-git-send-email-fenghua.yu@intel.com> <697ee0bd-a5f6-7712-017e-455eed5bc185@redhat.com> <79b659fb-1c16-463d-aa74-f1b3d8a9db5d@redhat.com> <08b44b2b7aede11a350f234768d5c17f8445984e.camel@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: linux-kernel , x86 , kvm@vger.kernel.org To: Paolo Bonzini , Fenghua Yu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Dave Hansen , Ashok Raj , Peter Zijlstra , Ravi V Shankar Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Mon, 2019-03-04 at 12:14 +0100, Paolo Bonzini wrote: > On 04/03/19 12:10, Xiaoyao Li wrote: > > Like you said before, I think we don't need the condition judgment > > "if(boot_cpu_has(X86_FEATURE_SPLIT_LOCK_DETECT))", but to set > > F(CORE_CAPABILITY) > > always for guest since MSR_IA32_CORE_CAPABILITY is emulated. > > > > And we should set the right emulated value of MSR_IA32_CORE_CAPABILITY for > > guest > > in function kvm_get_core_capability() based on whether > > boot_cpu_has(X86_FEATURE_SPLIT_LOCK_DETECT) just as you commented in the > > next > > patch. > > Yes, that would certainly be better. However, you'd also have to move > MSR_IA32_CORE_CAPABILITY handling to x86.c, because you'd have to enable > X86_FEATURE_CORE_CAPABILITY for AMD. > > Paolo Thanks for your comments and advises. I'll do it in next version. Xiaoyao