Re: [RFCv2 13/13] KVM: unmap guest memory using poisoned pages

2021-04-19 Thread Xiaoyao Li
On 4/17/2021 1:30 AM, Sean Christopherson wrote: On Fri, Apr 16, 2021, Kirill A. Shutemov wrote: [...] index fadaccb95a4c..cd2374802702 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -436,6 +436,8 @@ static inline int kvm_arch_vcpu_memslots_id(struct kvm_vcpu *vcpu)

Re: [PATCH v2 1/3] KVM: X86: Rename DR6_INIT to DR6_ACTIVE_LOW

2021-04-02 Thread Xiaoyao Li
On 2/3/2021 12:05 AM, Paolo Bonzini wrote: On 02/02/21 16:02, Xiaoyao Li wrote: On 2/2/2021 10:49 PM, Paolo Bonzini wrote: On 02/02/21 10:04, Chenyi Qiang wrote:  #define DR6_FIXED_1    0xfffe0ff0 -#define DR6_INIT    0x0ff0 +/* + * DR6_ACTIVE_LOW is actual the result of DR6_FIXED_1

Re: [PATCH v1 1/1] x86/tdx: Handle MWAIT, MONITOR and WBINVD

2021-03-29 Thread Xiaoyao Li
On 3/27/2021 8:18 AM, Kuppuswamy Sathyanarayanan wrote: In non-root TDX guest mode, MWAIT, MONITOR and WBINVD instructions are not supported. So handle #VE due to these instructions as no ops. Signed-off-by: Kuppuswamy Sathyanarayanan Reviewed-by: Andi Kleen --- Changes since previous

Re: [PATCH v2 1/3] KVM: X86: Rename DR6_INIT to DR6_ACTIVE_LOW

2021-02-02 Thread Xiaoyao Li
On 2/2/2021 10:49 PM, Paolo Bonzini wrote: On 02/02/21 10:04, Chenyi Qiang wrote:  #define DR6_FIXED_1    0xfffe0ff0 -#define DR6_INIT    0x0ff0 +/* + * DR6_ACTIVE_LOW is actual the result of DR6_FIXED_1 | ACTIVE_LOW_BITS. + * We can regard all the current FIXED_1 bits as active_low bits

Re: [RESEND PATCH 1/2] KVM: X86: Add support for the emulation of DR6_BUS_LOCK bit

2021-01-27 Thread Xiaoyao Li
On 1/28/2021 3:25 PM, Paolo Bonzini wrote: On 28/01/21 08:17, Xiaoyao Li wrote: "Active low" means that the bit is usually 1 and goes to 0 when the condition (such as RTM or bus lock) happens.  For almost all those DR6 bits the value is in fact always 1, but if they a

Re: [RESEND PATCH 1/2] KVM: X86: Add support for the emulation of DR6_BUS_LOCK bit

2021-01-27 Thread Xiaoyao Li
On 1/27/2021 6:04 PM, Paolo Bonzini wrote: On 27/01/21 04:41, Xiaoyao Li wrote: On 1/27/2021 12:31 AM, Paolo Bonzini wrote: On 08/01/21 07:49, Chenyi Qiang wrote: To avoid breaking the CPUs without bus lock detection, activate the DR6_BUS_LOCK bit (bit 11) conditionally in DR6_FIXED_1 bits

Re: [RESEND PATCH 1/2] KVM: X86: Add support for the emulation of DR6_BUS_LOCK bit

2021-01-26 Thread Xiaoyao Li
On 1/27/2021 12:31 AM, Paolo Bonzini wrote: On 08/01/21 07:49, Chenyi Qiang wrote: To avoid breaking the CPUs without bus lock detection, activate the DR6_BUS_LOCK bit (bit 11) conditionally in DR6_FIXED_1 bits. The set/clear of DR6_BUS_LOCK is similar to the DR6_RTM in DR6 register. The

Re: [PATCH RFC v3 2/4] x86/bus_lock: Handle warn and fatal in #DB for bus lock

2020-11-03 Thread Xiaoyao Li
On 10/31/2020 8:27 AM, Fenghua Yu wrote: ... diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index 3c70fb34028b..1c3442000972 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c @@ -953,6 +953,13 @@ static __always_inline void exc_debug_user(struct pt_regs *regs,

Re: [PATCH] KVM: VMX: Enable Notify VM exit

2020-11-02 Thread Xiaoyao Li
On 11/3/2020 2:08 PM, Tao Xu wrote: On 11/3/20 12:43 AM, Andy Lutomirski wrote: On Sun, Nov 1, 2020 at 10:14 PM Tao Xu wrote: ... +static int handle_notify(struct kvm_vcpu *vcpu) +{ +   unsigned long exit_qualification = vmcs_readl(EXIT_QUALIFICATION); + +   /* +    *

Re: [PATCH] KVM: VMX: Enable Notify VM exit

2020-11-02 Thread Xiaoyao Li
On 11/3/2020 2:25 AM, Paolo Bonzini wrote: On 02/11/20 19:01, Andy Lutomirski wrote: What's the point? Surely the kernel should reliably mitigate the flaw, and the kernel should decide how to do so. There is some slowdown in trapping #DB and #AC unconditionally. Though for these two cases

Re: [PATCH] KVM: VMX: Enable Notify VM exit

2020-11-02 Thread Xiaoyao Li
is enabled. Co-developed-by: Xiaoyao Li Signed-off-by: Tao Xu Signed-off-by: Xiaoyao Li Do you have test cases? yes we have. The nested #AC (CVE-2015-5307) is a known test case, though we need to tweak KVM to disable interception #AC for it. Not yet, because we are waiting real silicon

Re: [PATCH] KVM: X86: Expose KVM_HINTS_REALTIME in KVM_GET_SUPPORTED_CPUID

2020-10-22 Thread Xiaoyao Li
On 10/22/2020 10:06 PM, Paolo Bonzini wrote: On 22/10/20 15:31, Xiaoyao Li wrote: It's common for userspace to copy all supported CPUID bits to KVM_SET_CPUID2, I don't think this is the right behavior for KVM_HINTS_REALTIME. It reminds of X86_FEATURE_WAITPKG, which is added to supported

Re: [PATCH] KVM: X86: Expose KVM_HINTS_REALTIME in KVM_GET_SUPPORTED_CPUID

2020-10-22 Thread Xiaoyao Li
On 10/22/2020 9:02 PM, Paolo Bonzini wrote: On 22/10/20 03:34, Wanpeng Li wrote: From: Wanpeng Li Per KVM_GET_SUPPORTED_CPUID ioctl documentation: This ioctl returns x86 cpuid features which are supported by both the hardware and kvm in its default configuration. A well-behaved userspace

Re: [RFC v2 2/2] KVM: VMX: Enable bus lock VM exit

2020-09-02 Thread Xiaoyao Li
On 9/3/2020 6:44 AM, Sean Christopherson wrote: On Tue, Sep 01, 2020 at 10:43:12AM +0200, Vitaly Kuznetsov wrote: @@ -6809,6 +6824,19 @@ static fastpath_t vmx_vcpu_run(struct kvm_vcpu *vcpu) if (unlikely(vmx->exit_reason.failed_vmentry)) return EXIT_FASTPATH_NONE; +

Re: [PATCH 1/5] KVM: nVMX: Fix VMX controls MSRs setup when nested VMX enabled

2020-08-31 Thread Xiaoyao Li
On 8/28/2020 4:56 PM, Chenyi Qiang wrote: KVM supports the nested VM_{EXIT, ENTRY}_LOAD_IA32_PERF_GLOBAL_CTRL and VM_{ENTRY_LOAD, EXIT_CLEAR}_BNDCFGS, but they doesn't expose during the setup of nested VMX controls MSR. Signed-off-by: Chenyi Qiang Reviewed-by: Xiaoyao Li --- arch/x86

Re: [PATCH 1/5] KVM: nVMX: Fix VMX controls MSRs setup when nested VMX enabled

2020-08-28 Thread Xiaoyao Li
On 8/29/2020 9:49 AM, Chenyi Qiang wrote: On 8/29/2020 1:43 AM, Jim Mattson wrote: On Fri, Aug 28, 2020 at 1:54 AM Chenyi Qiang wrote: KVM supports the nested VM_{EXIT, ENTRY}_LOAD_IA32_PERF_GLOBAL_CTRL and VM_{ENTRY_LOAD, EXIT_CLEAR}_BNDCFGS, but they doesn't expose during the setup of

[PATCH v10 2/9] x86/split_lock: Remove bogus case in handle_guest_split_lock()

2020-08-19 Thread Xiaoyao Li
or sld_fatal when handle_guest_split_lock() is called. Signed-off-by: Xiaoyao Li --- The alternative would be to remove the "SLD enabled" check from KVM so that a truly unexpected/bogus #AC would generate a warn. It's not clear whether or not calling handle_guest_split_lock() iff SLD

[PATCH v10 9/9] x86/split_lock: Enable split lock detection initialization when running as a guest on KVM

2020-08-19 Thread Xiaoyao Li
. Signed-off-by: Xiaoyao Li --- arch/x86/include/asm/cpu.h | 2 ++ arch/x86/kernel/cpu/intel.c | 12 ++-- arch/x86/kernel/kvm.c | 3 +++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h index 2971a29d5094

[PATCH v10 7/9] KVM: VMX: virtualize split lock detection

2020-08-19 Thread Xiaoyao Li
. KVM always keeps SLD bit turned on for guest vcpu. The reason why not force guest MSR_CTRL.SLD bit to 1 is that guest needs to set this bit to 1 itself to tell KVM it's SLD-aware. Signed-off-by: Xiaoyao Li --- arch/x86/kvm/cpuid.c | 6 arch/x86/kvm/vmx/vmx.c | 68

[PATCH v10 6/9] KVM: VMX: Enable MSR TEST_CTRL for guest

2020-08-19 Thread Xiaoyao Li
Unconditionally allow the guest to read and zero-write MSR TEST_CTRL. This matches the fact that most Intel CPUs support MSR TEST_CTRL, and it also alleviates the effort to handle wrmsr/rdmsr when split lock detection is exposed to the guest in a future patch. Signed-off-by: Xiaoyao Li

[PATCH v10 8/9] x86/split_lock: Set cpu_model_supports_sld to true after the existence of split lock detection is verified BSP

2020-08-19 Thread Xiaoyao Li
It should be more resonable to set cpu_model_supports_sld to true after BSP is verified to have feature split lock detection. It also avoids externing the cpu_model_supports_sld when enumerate the split lock detection in a guest via PV interface in a future patch. Signed-off-by: Xiaoyao Li

[PATCH v10 5/9] x86/kvm: Introduce paravirt split lock detection enumeration

2020-08-19 Thread Xiaoyao Li
-by: Xiaoyao Li --- Documentation/virt/kvm/cpuid.rst | 29 arch/x86/include/uapi/asm/kvm_para.h | 8 +--- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/Documentation/virt/kvm/cpuid.rst b/Documentation/virt/kvm/cpuid.rst index a7dff9186bed

[PATCH v10 3/9] x86/split_lock: Introduce flag X86_FEATURE_SLD_FATAL and drop sld_state

2020-08-19 Thread Xiaoyao Li
-by: Xiaoyao Li --- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/cpu/intel.c| 16 ++-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index 2901d5df4366..caf9f4e3e876 100644

[PATCH v10 4/9] x86/split_lock: Introduce split_lock_virt_switch() and two wrappers

2020-08-19 Thread Xiaoyao Li
handled by wrappers, split_lock_set_guest() and split_lock_restore_host(), that will be used by KVM when virtualizing split lock detection for guest in the future. Signed-off-by: Xiaoyao Li --- arch/x86/include/asm/cpu.h | 34 ++ arch/x86/kernel/cpu/inte

[PATCH v10 0/9] KVM: Add virtualization support of split lock detection

2020-08-19 Thread Xiaoyao Li
. Xiaoyao Li (9): x86/split_lock: Rename TIF_SLD to TIF_SLD_DISABLED x86/split_lock: Remove bogus case in handle_guest_split_lock() x86/split_lock: Introduce flag X86_FEATURE_SLD_FATAL and drop sld_state x86/split_lock: Introduce split_lock_virt_switch() and two wrappers x86/kvm: Introduce

[PATCH v10 1/9] x86/split_lock: Rename TIF_SLD to TIF_SLD_DISABLED

2020-08-19 Thread Xiaoyao Li
-by: Thomas Gleixner Signed-off-by: Xiaoyao Li --- arch/x86/include/asm/thread_info.h | 6 +++--- arch/x86/kernel/cpu/intel.c| 6 +++--- arch/x86/kernel/process.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include

Re: [RFC 2/2] KVM: VMX: Enable bus lock VM exit

2020-07-26 Thread Xiaoyao Li
On 7/23/2020 9:21 AM, Sean Christopherson wrote: On Wed, Jul 01, 2020 at 04:49:49PM +0200, Vitaly Kuznetsov wrote: Xiaoyao Li writes: So you want an exit to userspace for every bus lock and leave it all to userspace. Yes, it's doable. In some cases we may not even want to have a VM exit

Re: kvm crash on 5.7-rc1 and later

2020-07-12 Thread Xiaoyao Li
On 7/12/2020 2:21 AM, Peter Zijlstra wrote: On Fri, Jul 03, 2020 at 11:15:31AM -0400, Woody Suwalski wrote: I am observing a 100% reproducible kvm crash on kernels starting with 5.7-rc1, always with the same opcode . It happens during wake up from the host suspended state. Worked OK on 5.6

[PATCH v4 0/5] Refactor handling flow of KVM_SET_CPUID*

2020-07-08 Thread Xiaoyao Li
pdate_vcpu_model() [Sean] - Add patch 5 to rename kvm_x86_ops.cpuid_date() to kvm_x86_ops.update_vcpu_model() v1: https://lkml.kernel.org/r/20200529085545.29242-1-xiaoyao...@intel.com Xiaoyao Li (5): KVM: x86: Introduce kvm_check_cpuid() KVM: x86: Extract kvm_update_cpuid_runtime() fr

[PATCH v4 1/5] KVM: x86: Introduce kvm_check_cpuid()

2020-07-08 Thread Xiaoyao Li
Use kvm_check_cpuid() to validate if userspace provides legal cpuid settings and call it before KVM take any action to update CPUID or update vcpu states based on given CPUID settings. Signed-off-by: Xiaoyao Li --- arch/x86/kvm/cpuid.c | 55 arch/x86

[PATCH v4 4/5] KVM: x86: Rename cpuid_update() callback to vcpu_after_set_cpuid()

2020-07-08 Thread Xiaoyao Li
The name of callback cpuid_update() is misleading that it's not about updating CPUID settings of vcpu but updating the configurations of vcpu based on the CPUIDs. So rename it to vcpu_after_set_cpuid(). Signed-off-by: Xiaoyao Li --- arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/cpuid.c

[PATCH v4 3/5] KVM: x86: Rename kvm_update_cpuid() to kvm_vcpu_after_set_cpuid()

2020-07-08 Thread Xiaoyao Li
Now there is no updating CPUID bits behavior in kvm_update_cpuid(), rename it to kvm_vcpu_after_set_cpuid(). Signed-off-by: Xiaoyao Li --- arch/x86/kvm/cpuid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index

[PATCH v4 5/5] KVM: x86: Move kvm_x86_ops.vcpu_after_set_cpuid() into kvm_vcpu_after_set_cpuid()

2020-07-08 Thread Xiaoyao Li
-by: Xiaoyao Li --- --- arch/x86/kvm/cpuid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 832a24c1334e..edbed4f522f2 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -121,6 +121,8 @@ static void

[PATCH v4 2/5] KVM: x86: Extract kvm_update_cpuid_runtime() from kvm_update_cpuid()

2020-07-08 Thread Xiaoyao Li
as a separate kvm_update_cpuid_runtime(). Signed-off-by: Xiaoyao Li --- arch/x86/kvm/cpuid.c | 44 +++- arch/x86/kvm/cpuid.h | 2 +- arch/x86/kvm/lapic.c | 2 +- arch/x86/kvm/x86.c | 10 +- 4 files changed, 34 insertions(+), 24 deletions(-) diff

Re: [PATCH v3 0/8] Refactor handling flow of KVM_SET_CPUID*

2020-07-08 Thread Xiaoyao Li
On 7/8/2020 8:10 PM, Paolo Bonzini wrote: On 08/07/20 08:50, Xiaoyao Li wrote: This serial is the extended version of https://lkml.kernel.org/r/20200528151927.14346-1-xiaoyao...@intel.com First two patches are bug fixing, and the others aim to refactor the flow of SET_CPUID* as: 1. cpuid

Re: [PATCH v3 4/8] KVM: X86: Split kvm_update_cpuid()

2020-07-08 Thread Xiaoyao Li
On 7/8/2020 8:41 PM, Paolo Bonzini wrote: On 08/07/20 14:33, Xiaoyao Li wrote: On 7/8/2020 8:06 PM, Paolo Bonzini wrote: On 08/07/20 08:50, Xiaoyao Li wrote: Split the part of updating vcpu model out of kvm_update_cpuid(), and put it into a new kvm_update_vcpu_model(). So it's more clear

Re: [PATCH v3 4/8] KVM: X86: Split kvm_update_cpuid()

2020-07-08 Thread Xiaoyao Li
On 7/8/2020 8:06 PM, Paolo Bonzini wrote: On 08/07/20 08:50, Xiaoyao Li wrote: Split the part of updating vcpu model out of kvm_update_cpuid(), and put it into a new kvm_update_vcpu_model(). So it's more clear that kvm_update_cpuid() is to update guest CPUID settings, while

Re: [PATCH v3 3/8] KVM: X86: Introduce kvm_check_cpuid()

2020-07-08 Thread Xiaoyao Li
On 7/8/2020 2:50 PM, Xiaoyao Li wrote: Use kvm_check_cpuid() to validate if userspace provides legal cpuid settings and call it before KVM updates CPUID. Signed-off-by: Xiaoyao Li [...] @@ -202,12 +208,16 @@ int kvm_vcpu_ioctl_set_cpuid(struct kvm_vcpu *vcpu, vcpu

Re: [PATCH v2] x86/speculation/l1tf: Add KConfig for setting the L1D cache flush mode

2020-07-08 Thread Xiaoyao Li
On 7/3/2020 5:38 AM, Abhishek Bhardwaj wrote: This change adds a new kernel configuration that sets the l1d cache flush setting at compile time rather than at run time. Signed-off-by: Abhishek Bhardwaj --- Changes in v2: - Fix typo in the help of the new KConfig.

[PATCH v3 4/8] KVM: X86: Split kvm_update_cpuid()

2020-07-08 Thread Xiaoyao Li
. Signed-off-by: Xiaoyao Li --- arch/x86/kvm/cpuid.c | 38 -- arch/x86/kvm/cpuid.h | 1 + arch/x86/kvm/x86.c | 1 + 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index a825878b7f84..001f5a94880e 100644

[PATCH v3 8/8] KVM: X86: Move kvm_apic_set_version() to kvm_update_vcpu_model()

2020-07-08 Thread Xiaoyao Li
There is no dependencies between kvm_apic_set_version() and kvm_update_cpuid() because kvm_apic_set_version() queries X2APIC CPUID bit, which is not touched/changed by kvm_update_cpuid(). Obviously, kvm_apic_set_version() belongs to the category of updating vcpu model. Signed-off-by: Xiaoyao Li

[PATCH v3 6/8] KVM: X86: Move kvm_x86_ops.update_vcpu_model() into kvm_update_vcpu_model()

2020-07-08 Thread Xiaoyao Li
reasonable. Signed-off-by: Xiaoyao Li --- --- arch/x86/kvm/cpuid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index d2f93823f9fd..89ffd9dccfc6 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -121,6 +121,8

[PATCH v3 7/8] KVM: lapic: Use guest_cpuid_has() in kvm_apic_set_version()

2020-07-08 Thread Xiaoyao Li
Only code cleanup and no functional change. Signed-off-by: Xiaoyao Li --- arch/x86/kvm/lapic.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 5bf72fc86a8e..e5dbb7ebae78 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm

[PATCH v3 3/8] KVM: X86: Introduce kvm_check_cpuid()

2020-07-08 Thread Xiaoyao Li
Use kvm_check_cpuid() to validate if userspace provides legal cpuid settings and call it before KVM updates CPUID. Signed-off-by: Xiaoyao Li --- Is the check of virutal address width really necessary? KVM doesn't check other bits at all. I guess the policy is that KVM allows illegal CPUID

[PATCH v3 2/8] KVM: X86: Go on updating other CPUID leaves when leaf 1 is absent

2020-07-08 Thread Xiaoyao Li
out of this function in a future patch. Signed-off-by: Xiaoyao Li --- arch/x86/kvm/cpuid.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 1d13bad42bf9..0e3a23c2ea55 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/

[PATCH v3 5/8] KVM: X86: Rename cpuid_update() to update_vcpu_model()

2020-07-08 Thread Xiaoyao Li
The name of callback cpuid_update() is misleading that it's not about updating CPUID settings of vcpu but updating the configurations of vcpu based on the CPUIDs. So rename it to update_vcpu_model(). Signed-off-by: Xiaoyao Li --- arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/cpuid.c

[PATCH v3 1/8] KVM: X86: Reset vcpu->arch.cpuid_nent to 0 if SET_CPUID* fails

2020-07-08 Thread Xiaoyao Li
rantee that previous valid CPUID configuration is kept. Signed-off-by: Xiaoyao Li --- Documentation/virt/kvm/api.rst | 4 arch/x86/kvm/cpuid.c | 4 2 files changed, 8 insertions(+) diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index 1cfe79b932d6..3ca809

[PATCH v3 0/8] Refactor handling flow of KVM_SET_CPUID*

2020-07-08 Thread Xiaoyao Li
aster' into HEAD") - change the name of kvm_update_state_based_on_cpuid() to kvm_update_vcpu_model() [Sean] - Add patch 5 to rename kvm_x86_ops.cpuid_date() to kvm_x86_ops.update_vcpu_model() v1: https://lkml.kernel.org/r/20200529085545.29242-1-xiaoyao...@intel.com Xiaoyao Li (8):

Re: [PATCH v12 07/11] KVM: vmx/pmu: Unmask LBR fields in the MSR_IA32_DEBUGCTLMSR emualtion

2020-07-07 Thread Xiaoyao Li
On 7/8/2020 4:21 AM, Sean Christopherson wrote: On Sat, Jun 13, 2020 at 05:42:50PM +0800, Xu, Like wrote: On 2020/6/13 17:14, Xiaoyao Li wrote: On 6/13/2020 4:09 PM, Like Xu wrote: [...] @@ -237,6 +238,9 @@ static int intel_pmu_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info

Re: [PATCH v2 7/7] KVM: X86: Move kvm_apic_set_version() to kvm_update_vcpu_model()

2020-07-02 Thread Xiaoyao Li
On 7/3/2020 3:00 AM, Sean Christopherson wrote: On Tue, Jun 23, 2020 at 07:58:16PM +0800, Xiaoyao Li wrote: Obviously, kvm_apic_set_version() fits well in kvm_update_vcpu_model(). Same as the last patch, it would be nice to explicitly document that there are no dependencies between

Re: [PATCH v2 6/7] KVM: X86: Move kvm_x86_ops.update_vcpu_model() into kvm_update_vcpu_model()

2020-07-02 Thread Xiaoyao Li
On 7/3/2020 2:59 AM, Sean Christopherson wrote: On Tue, Jun 23, 2020 at 07:58:15PM +0800, Xiaoyao Li wrote: kvm_x86_ops.update_vcpu_model() is used to update vmx/svm vcpu settings based on updated CPUID settings. So it's supposed to be called after CPUIDs are fully updated, i.e

Re: [PATCH v2 2/7] KVM: X86: Go on updating other CPUID leaves when leaf 1 is absent

2020-07-02 Thread Xiaoyao Li
On 7/3/2020 3:02 AM, Sean Christopherson wrote: On Thu, Jul 02, 2020 at 11:54:03AM -0700, Sean Christopherson wrote: On Tue, Jun 23, 2020 at 07:58:11PM +0800, Xiaoyao Li wrote: As handling of bits other leaf 1 added over time, kvm_update_cpuid() should not return directly if leaf 1 is absent

Re: [PATCH v13 03/11] KVM: VMX: Set guest CET MSRs per KVM and host configuration

2020-07-02 Thread Xiaoyao Li
On 7/1/2020 4:04 PM, Yang Weijiang wrote: CET MSRs pass through guest directly to enhance performance. CET runtime control settings are stored in MSR_IA32_{U,S}_CET, Shadow Stack Pointer(SSP) are stored in MSR_IA32_PL{0,1,2,3}_SSP, SSP table base address is stored in MSR_IA32_INT_SSP_TAB, these

Re: [RFC 2/2] KVM: VMX: Enable bus lock VM exit

2020-07-02 Thread Xiaoyao Li
On 7/1/2020 10:49 PM, Vitaly Kuznetsov wrote: Xiaoyao Li writes: On 7/1/2020 8:44 PM, Vitaly Kuznetsov wrote: Xiaoyao Li writes: On 7/1/2020 5:04 PM, Vitaly Kuznetsov wrote: Chenyi Qiang writes: [...] static const int kvm_vmx_max_exit_handlers = @@ -6830,6 +6838,13 @@ static

Re: [RFC 2/2] KVM: VMX: Enable bus lock VM exit

2020-07-01 Thread Xiaoyao Li
On 7/1/2020 8:44 PM, Vitaly Kuznetsov wrote: Xiaoyao Li writes: On 7/1/2020 5:04 PM, Vitaly Kuznetsov wrote: Chenyi Qiang writes: [...] static const int kvm_vmx_max_exit_handlers = @@ -6830,6 +6838,13 @@ static fastpath_t vmx_vcpu_run(struct kvm_vcpu *vcpu) if (unlikely(vmx

Re: [RFC 2/2] KVM: VMX: Enable bus lock VM exit

2020-07-01 Thread Xiaoyao Li
On 7/1/2020 5:04 PM, Vitaly Kuznetsov wrote: Chenyi Qiang writes: [...] static const int kvm_vmx_max_exit_handlers = @@ -6830,6 +6838,13 @@ static fastpath_t vmx_vcpu_run(struct kvm_vcpu *vcpu) if (unlikely(vmx->exit_reason.failed_vmentry)) return EXIT_FASTPATH_NONE;

Re: [PATCH v9 0/8] KVM: Add virtualization support of split lock detection

2020-06-30 Thread Xiaoyao Li
Ping for comments. On 5/9/2020 7:05 PM, Xiaoyao Li wrote: This series aims to add the virtualization of split lock detection in KVM. Due to the fact that split lock detection is tightly coupled with CPU model and CPU model is configurable by host VMM, we elect to use paravirt method to expose

Re: [PATCH v2 1/7] KVM: X86: Reset vcpu->arch.cpuid_nent to 0 if SET_CPUID fails

2020-06-23 Thread Xiaoyao Li
On 6/24/2020 2:20 AM, Jim Mattson wrote: On Tue, Jun 23, 2020 at 4:58 AM Xiaoyao Li wrote: It needs to invalidate CPUID configruations if usersapce provides Nits: configurations, userspace oh, I'll fix it. illegal input. Signed-off-by: Xiaoyao Li --- arch/x86/kvm/cpuid.c | 4

[PATCH v2 2/7] KVM: X86: Go on updating other CPUID leaves when leaf 1 is absent

2020-06-23 Thread Xiaoyao Li
As handling of bits other leaf 1 added over time, kvm_update_cpuid() should not return directly if leaf 1 is absent, but should go on updateing other CPUID leaves. Signed-off-by: Xiaoyao Li --- arch/x86/kvm/cpuid.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions

[PATCH v2 4/7] KVM: X86: Split kvm_update_cpuid()

2020-06-23 Thread Xiaoyao Li
. Signed-off-by: Xiaoyao Li --- arch/x86/kvm/cpuid.c | 38 -- arch/x86/kvm/cpuid.h | 1 + arch/x86/kvm/x86.c | 1 + 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 67e5c68fdb45..001f5a94880e 100644

[PATCH v2 3/7] KVM: X86: Introduce kvm_check_cpuid()

2020-06-23 Thread Xiaoyao Li
Use kvm_check_cpuid() to validate if userspace provides legal cpuid settings and call it before KVM updates CPUID. Signed-off-by: Xiaoyao Li --- Is the check of virutal address width really necessary? KVM doesn't check other bits at all. I guess the policy is that KVM allows illegal CPUID

[PATCH v2 5/7] KVM: X86: Rename cpuid_update() to update_vcpu_model()

2020-06-23 Thread Xiaoyao Li
The name of callback cpuid_update() is misleading that it's not about updating CPUID settings of vcpu but updating the configurations of vcpu based on the CPUIDs. So rename it to update_vcpu_model(). Signed-off-by: Xiaoyao Li --- arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/cpuid.c

[PATCH v2 1/7] KVM: X86: Reset vcpu->arch.cpuid_nent to 0 if SET_CPUID fails

2020-06-23 Thread Xiaoyao Li
It needs to invalidate CPUID configruations if usersapce provides illegal input. Signed-off-by: Xiaoyao Li --- arch/x86/kvm/cpuid.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 8a294f9747aa..1d13bad42bf9 100644 --- a/arch/x86/kvm

[PATCH v2 0/7] Refactor handling flow of SET_CPUID*

2020-06-23 Thread Xiaoyao Li
- change the name of kvm_update_state_based_on_cpuid() to kvm_update_vcpu_model() [Sean] - Add patch 5 to rename kvm_x86_ops.cpuid_date() to kvm_x86_ops.update_vcpu_model() v1: https://lkml.kernel.org/r/20200529085545.29242-1-xiaoyao...@intel.com Xiaoyao Li (7): KVM: X86: Reset vcpu->ar

[PATCH v2 7/7] KVM: X86: Move kvm_apic_set_version() to kvm_update_vcpu_model()

2020-06-23 Thread Xiaoyao Li
Obviously, kvm_apic_set_version() fits well in kvm_update_vcpu_model(). Signed-off-by: Xiaoyao Li --- arch/x86/kvm/cpuid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 5decc2dd5448..3428f4d84b42 100644 --- a/arch/x86

[PATCH v2 6/7] KVM: X86: Move kvm_x86_ops.update_vcpu_model() into kvm_update_vcpu_model()

2020-06-23 Thread Xiaoyao Li
kvm_x86_ops.update_vcpu_model() is used to update vmx/svm vcpu settings based on updated CPUID settings. So it's supposed to be called after CPUIDs are fully updated, i.e., kvm_update_cpuid(). Move it in kvm_update_vcpu_model(). Signed-off-by: Xiaoyao Li --- --- arch/x86/kvm/cpuid.c | 5

Re: [PATCH] KVM: VMX: Stop context switching MSR_IA32_UMWAIT_CONTROL

2020-06-22 Thread Xiaoyao Li
On 6/23/2020 8:51 AM, Sean Christopherson wrote: Remove support for context switching between the guest's and host's desired UMWAIT_CONTROL. Propagating the guest's value to hardware isn't required for correct functionality, e.g. KVM intercepts reads and writes to the MSR, and the latency

[PATCH] KVM: X86: Fix MSR range of APIC registers in X2APIC mode

2020-06-16 Thread Xiaoyao Li
Only MSR address range 0x800 through 0x8ff is architecturally reserved and dedicated for accessing APIC registers in x2APIC mode. Fixes: 0105d1a52640 ("KVM: x2apic interface to lapic") Signed-off-by: Xiaoyao Li --- arch/x86/kvm/x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [PATCH v12 07/11] KVM: vmx/pmu: Unmask LBR fields in the MSR_IA32_DEBUGCTLMSR emualtion

2020-06-13 Thread Xiaoyao Li
On 6/13/2020 4:09 PM, Like Xu wrote: When the LBR feature is reported by the vmx_get_perf_capabilities(), the LBR fields in the [vmx|vcpu]_supported debugctl should be unmasked. The debugctl msr is handled separately in vmx/svm and they're not completely identical, hence remove the common msr

Re: [PATCH] x86/split_lock: Sanitize userspace and guest error output

2020-06-05 Thread Xiaoyao Li
On 6/6/2020 12:42 AM, Prarit Bhargava wrote: On 6/5/20 11:29 AM, Xiaoyao Li wrote: On 6/5/2020 7:44 PM, Prarit Bhargava wrote: There are two problems with kernel messages in fatal mode that were found during testing of guests and userspace programs. The first is that no kernel message

Re: [PATCH] x86/split_lock: Don't write MSR_TEST_CTRL on CPUs that aren't whitelisted

2020-06-05 Thread Xiaoyao Li
On 6/6/2020 3:26 AM, Sean Christopherson wrote: Choo! Choo! All aboard the Split Lock Express, with direct service to Wreckage! Skip split_lock_verify_msr() if the CPU isn't whitelisted as a possible SLD-enabled CPU model to avoid writing MSR_TEST_CTRL. MSR_TEST_CTRL exists, and is writable,

Re: [PATCH] x86/split_lock: Sanitize userspace and guest error output

2020-06-05 Thread Xiaoyao Li
Molnar Cc: Borislav Petkov Cc: x...@kernel.org Cc: "H. Peter Anvin" Cc: Tony Luck Cc: "Peter Zijlstra (Intel)" Cc: Sean Christopherson Cc: Rahul Tanwar Cc: Xiaoyao Li Cc: Ricardo Neri Cc: Dave Hansen --- arch/x86/kernel/cpu/intel.c | 24 ++--

Re: [PATCH][v6] KVM: X86: support APERF/MPERF registers

2020-06-04 Thread Xiaoyao Li
On 6/5/2020 9:44 AM, Li RongQing wrote: Guest kernel reports a fixed cpu frequency in /proc/cpuinfo, this is confused to user when turbo is enable, and aperf/mperf can be used to show current cpu frequency after 7d5905dc14a "(x86 / CPU: Always show current CPU frequency in /proc/cpuinfo)" so

[PATCH v2] KVM: x86: Assign correct value to array.maxnent

2020-06-03 Thread Xiaoyao Li
Delay the assignment of array.maxnent to use correct value for the case cpuid->nent > KVM_MAX_CPUID_ENTRIES. Fixes: e53c95e8d41e ("KVM: x86: Encapsulate CPUID entries and metadata in struct") Signed-off-by: Xiaoyao Li --- v2: - remove "const" of maxnent to fix buil

Re: [PATCH] KVM: x86: Assign correct value to array.maxnent

2020-06-03 Thread Xiaoyao Li
On 6/4/2020 10:43 AM, Xiaoyao Li wrote: Delay the assignment of array.maxnent to use correct value for the case cpuid->nent > KVM_MAX_CPUID_ENTRIES. Fixes: e53c95e8d41e ("KVM: x86: Encapsulate CPUID entries and metadata in struct") Signed-off-by: Xiaoyao Li --- arch/x86

[PATCH] KVM: x86: Assign correct value to array.maxnent

2020-06-03 Thread Xiaoyao Li
Delay the assignment of array.maxnent to use correct value for the case cpuid->nent > KVM_MAX_CPUID_ENTRIES. Fixes: e53c95e8d41e ("KVM: x86: Encapsulate CPUID entries and metadata in struct") Signed-off-by: Xiaoyao Li --- arch/x86/kvm/cpuid.c | 3 ++- 1 file changed, 2

Re: [PATCH 4/6] KVM: X86: Split kvm_update_cpuid()

2020-06-03 Thread Xiaoyao Li
On 6/3/2020 9:10 AM, Sean Christopherson wrote: On Fri, May 29, 2020 at 04:55:43PM +0800, Xiaoyao Li wrote: Split the part of updating KVM states from kvm_update_cpuid(), and put it into a new kvm_update_state_based_on_cpuid(). So it's clear that kvm_update_cpuid() is to update guest CPUID

Re: 答复: [PATCH][v5] KVM: X86: support APERF/MPERF registers

2020-05-30 Thread Xiaoyao Li
On 5/31/2020 10:08 AM, Li,Rongqing wrote: -邮件原件- 发件人: Xiaoyao Li [mailto:xiaoyao...@intel.com] 发送时间: 2020年5月30日 18:40 收件人: Li,Rongqing ; linux-kernel@vger.kernel.org; k...@vger.kernel.org; x...@kernel.org; h...@zytor.com; b...@alien8.de; mi...@redhat.com; t...@linutronix.de; jmatt

Re: [PATCH][v5] KVM: X86: support APERF/MPERF registers

2020-05-30 Thread Xiaoyao Li
On 5/30/2020 12:35 PM, Li RongQing wrote: Guest kernel reports a fixed cpu frequency in /proc/cpuinfo, this is confused to user when turbo is enable, and aperf/mperf can be used to show current cpu frequency after 7d5905dc14a "(x86 / CPU: Always show current CPU frequency in /proc/cpuinfo)" so

[PATCH 5/6] KVM: X86: Move kvm_x86_ops.cpuid_update() into kvm_update_state_based_on_cpuid()

2020-05-29 Thread Xiaoyao Li
specific states based on CPUID. Signed-off-by: Xiaoyao Li --- Should we rename kvm_x86_ops.cpuid_update to something like kvm_x86_ops.update_state_based_on_cpuid? cpuid_update is really confusing especially when kvm_x86_ops.update_cpuid() is needed someday. --- arch/x86/kvm/cpuid.c | 4 ++-- 1

[PATCH 2/6] KVM: X86: Go on updating other CPUID leaves when leaf 1 is absent

2020-05-29 Thread Xiaoyao Li
As handling of bits other leaf 1 added over time, kvm_update_cpuid() should not return directly if leaf 1 is absent, but should go on updateing other CPUID leaves. Signed-off-by: Xiaoyao Li --- arch/x86/kvm/cpuid.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions

[PATCH 0/6] Refactor handling flow of SET_CPUID*

2020-05-29 Thread Xiaoyao Li
special CPUID bits based on current vcpu state, e.g., OSXSAVE, OSPKE, ... 3. update KVM state: Update KVM states based on the final CPUID settings. Xiaoyao Li (6): KVM: X86: Reset vcpu->arch.cpuid_nent to 0 if SET_CPUID fails KVM: X86: Go on updating ot

[PATCH 4/6] KVM: X86: Split kvm_update_cpuid()

2020-05-29 Thread Xiaoyao Li
. Signed-off-by: Xiaoyao Li --- arch/x86/kvm/cpuid.c | 38 -- arch/x86/kvm/cpuid.h | 1 + arch/x86/kvm/x86.c | 1 + 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index c8cb373056f1..a4a2072f5253

[PATCH 1/6] KVM: X86: Reset vcpu->arch.cpuid_nent to 0 if SET_CPUID fails

2020-05-29 Thread Xiaoyao Li
It needs to invalidate CPUID configruations if usersapce provides illegal input. Signed-off-by: Xiaoyao Li --- arch/x86/kvm/cpuid.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index cd708b0b460a..2f1a9650b7f2 100644 --- a/arch/x86/kvm

[PATCH 6/6] KVM: X86: Move kvm_apic_set_version() to kvm_update_state_based_on_cpuid()

2020-05-29 Thread Xiaoyao Li
Obviously, kvm_apic_set_version() fits well in kvm_update_state_based_on_cpuid(). Signed-off-by: Xiaoyao Li --- arch/x86/kvm/cpuid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 5d4da8970940..eb60098aca29 100644

[PATCH 3/6] KVM: X86: Introduce kvm_check_cpuid()

2020-05-29 Thread Xiaoyao Li
Use kvm_check_cpuid() to validate if userspace provides legal cpuid settings and call it before KVM updates CPUID. Signed-off-by: Xiaoyao Li --- Is the check of virutal address width really necessary? KVM doesn't check other bits at all. I guess the policy is that KVM allows illegal CPUID

Re: [PATCH] KVM: X86: Call kvm_x86_ops.cpuid_update() after CPUIDs fully updated

2020-05-28 Thread Xiaoyao Li
On 5/29/2020 12:15 AM, Paolo Bonzini wrote: On 28/05/20 17:40, Xiaoyao Li wrote: kvm_x86_ops.cpuid_update() is used to update vmx/svm settings based on updated CPUID settings. So it's supposed to be called after CPUIDs are fully updated, not in the middle stage. Signed-off-by: Xiaoyao Li

Re: [PATCH] KVM: X86: Call kvm_x86_ops.cpuid_update() after CPUIDs fully updated

2020-05-28 Thread Xiaoyao Li
On 5/28/2020 11:22 PM, Paolo Bonzini wrote: On 28/05/20 17:19, Xiaoyao Li wrote: kvm_x86_ops.cpuid_update() is used to update vmx/svm settings based on updated CPUID settings. So it's supposed to be called after CPUIDs are fully updated, not in the middle stage. Signed-off-by: Xiaoyao Li

[PATCH] KVM: X86: Call kvm_x86_ops.cpuid_update() after CPUIDs fully updated

2020-05-28 Thread Xiaoyao Li
kvm_x86_ops.cpuid_update() is used to update vmx/svm settings based on updated CPUID settings. So it's supposed to be called after CPUIDs are fully updated, not in the middle stage. Signed-off-by: Xiaoyao Li --- arch/x86/kvm/cpuid.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions

Re: [PATCH v9 0/8] KVM: Add virtualization support of split lock detection

2020-05-26 Thread Xiaoyao Li
Hi Thomas, On 5/18/2020 9:27 AM, Xiaoyao Li wrote: On 5/9/2020 7:05 PM, Xiaoyao Li wrote: This series aims to add the virtualization of split lock detection in KVM. Due to the fact that split lock detection is tightly coupled with CPU model and CPU model is configurable by host VMM, we elect

Re: [PATCH 2/2] kvm/x86: don't expose MSR_IA32_UMWAIT_CONTROL unconditionally

2020-05-21 Thread Xiaoyao Li
On 5/21/2020 12:56 AM, Maxim Levitsky wrote: On Wed, 2020-05-20 at 18:33 +0200, Vitaly Kuznetsov wrote: Maxim Levitsky writes: This msr is only available when the host supports WAITPKG feature. This breaks a nested guest, if the L1 hypervisor is set to ignore unknown msrs, because the only

Re: [PATCH 2/2] kvm/x86: don't expose MSR_IA32_UMWAIT_CONTROL unconditionally

2020-05-21 Thread Xiaoyao Li
On 5/21/2020 1:28 PM, Tao Xu wrote: On 5/21/2020 12:33 PM, Xiaoyao Li wrote: On 5/21/2020 5:05 AM, Paolo Bonzini wrote: On 20/05/20 18:07, Maxim Levitsky wrote: This msr is only available when the host supports WAITPKG feature. This breaks a nested guest, if the L1 hypervisor is set

Re: [PATCH 2/2] kvm/x86: don't expose MSR_IA32_UMWAIT_CONTROL unconditionally

2020-05-20 Thread Xiaoyao Li
On 5/21/2020 5:05 AM, Paolo Bonzini wrote: On 20/05/20 18:07, Maxim Levitsky wrote: This msr is only available when the host supports WAITPKG feature. This breaks a nested guest, if the L1 hypervisor is set to ignore unknown msrs, because the only other safety check that the kernel does is

Re: [PATCH] kvm: x86: Use KVM CPU capabilities to determine CR4 reserved bits

2020-05-18 Thread Xiaoyao Li
On 5/18/2020 8:31 PM, Paolo Bonzini wrote: On 18/05/20 06:52, Xiaoyao Li wrote: On 5/6/2020 5:44 PM, Paolo Bonzini wrote: Using CPUID data can be useful for the processor compatibility check, but that's it.  Using it to compute guest-reserved bits can have both false positives (such as LA57

Re: [PATCH] kvm: x86: Use KVM CPU capabilities to determine CR4 reserved bits

2020-05-17 Thread Xiaoyao Li
On 5/6/2020 5:44 PM, Paolo Bonzini wrote: Using CPUID data can be useful for the processor compatibility check, but that's it. Using it to compute guest-reserved bits can have both false positives (such as LA57 and UMIP which we are already handling) and false negatives: in particular, with

Re: [PATCH v9 0/8] KVM: Add virtualization support of split lock detection

2020-05-17 Thread Xiaoyao Li
On 5/9/2020 7:05 PM, Xiaoyao Li wrote: This series aims to add the virtualization of split lock detection in KVM. Due to the fact that split lock detection is tightly coupled with CPU model and CPU model is configurable by host VMM, we elect to use paravirt method to expose and enumerate

Re: [PATCH v9 8/8] x86/split_lock: Enable split lock detection initialization when running as an guest on KVM

2020-05-10 Thread Xiaoyao Li
On 5/10/2020 1:15 PM, Andy Lutomirski wrote: On Fri, May 8, 2020 at 8:04 PM Xiaoyao Li wrote: When running as guest, enumerating feature split lock detection through CPU model is not easy since CPU model is configurable by host VMM. If running upon KVM, it can be enumerated through

[PATCH v9 3/8] x86/split_lock: Introduce flag X86_FEATURE_SLD_FATAL and drop sld_state

2020-05-08 Thread Xiaoyao Li
-by: Xiaoyao Li --- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/cpu/intel.c| 16 ++-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index db189945e9b0..260adfc6c61a 100644

[PATCH v9 7/8] KVM: VMX: virtualize split lock detection

2020-05-08 Thread Xiaoyao Li
. KVM always keeps SLD bit turned on for guest vcpu. The reason why not force guest MSR_CTRL.SLD bit to 1 is that guest needs to set this bit to 1 itself to tell KVM it's SLD-aware. Signed-off-by: Xiaoyao Li --- arch/x86/kvm/cpuid.c | 6 arch/x86/kvm/vmx/vmx.c | 68

[PATCH v9 8/8] x86/split_lock: Enable split lock detection initialization when running as an guest on KVM

2020-05-08 Thread Xiaoyao Li
. Signed-off-by: Xiaoyao Li --- arch/x86/include/asm/cpu.h | 2 ++ arch/x86/kernel/cpu/intel.c | 12 ++-- arch/x86/kernel/kvm.c | 3 +++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h index a57f00f1d5b5

  1   2   3   >