tweak HYPERV_CPUID_ENLIGHTMENT_INFO
Subsystems (4)
Vitaly Kuznetsov
maintainerv2 cover tweak HYPERV_CPUID_ENLIGHTMENT_INFO
Be more consistent with genuine Hyper-V: don't recommend using Enlightened VMCS when it wasn't enabled, don't advertise reset via synthetic MSR.
Vitaly Kuznetsov (2):
x86/kvm/hyper-v: don't recommend doing reset via synthetic MSR x86/kvm/hyper-v: recommend using eVMCS only when it is enabled
arch/x86/kvm/hyperv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.20.1
Vitaly Kuznetsov
maintainerPATCH v2 1/2 x86/kvm/hyper-v: don't recommend doing reset via synthetic MSR
System reset through synthetic MSR is not recommended neither by genuine Hyper-V nor my QEMU.
--- arch/x86/kvm/hyperv.c | 1 - 1 file changed, 1 deletion(-)
arch/x86/kvm/hyperv.c +0 -1
@@ -1847,7 +1847,6 @@ int kvm_vcpu_ioctl_get_hv_cpuid(struct kvm_vcpu *vcpu, struct kvm_cpuid2 *cpuid,case HYPERV_CPUID_ENLIGHTMENT_INFO : ent->eax |=HV_X64_REMOTE_TLB_FLUSH_RECOMMENDED ; ent->eax |=HV_X64_APIC_ACCESS_RECOMMENDED ; - ent->eax |=HV_X64_SYSTEM_RESET_RECOMMENDED ; ent->eax |=HV_X64_RELAXED_TIMING_RECOMMENDED ; ent->eax |=HV_X64_CLUSTER_IPI_RECOMMENDED ; ent->eax |=HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED ;
Signature · 1 line
2.20.1
Vitaly Kuznetsov
maintainerPATCH v2 2/2 x86/kvm/hyper-v: recommend using eVMCS only when it is enabled
In reply to Vitaly KuznetsovWe shouldn't probably be suggesting using Enlightened VMCS when it's not enabled (not supported from guest's point of view). Hyper-V on KVM seems to be fine either way but let's be consistent.
--- arch/x86/kvm/hyperv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/kvm/hyperv.c +2 -1
@@ -1850,7 +1850,8 @@ int kvm_vcpu_ioctl_get_hv_cpuid(struct kvm_vcpu *vcpu, struct kvm_cpuid2 *cpuid, ent->eax |=HV_X64_RELAXED_TIMING_RECOMMENDED ; ent->eax |=HV_X64_CLUSTER_IPI_RECOMMENDED ; ent->eax |=HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED ; - ent->eax |=HV_X64_ENLIGHTENED_VMCS_RECOMMENDED ; +if (evmcs_ver) + ent->eax |=HV_X64_ENLIGHTENED_VMCS_RECOMMENDED ;/* * Default number of spinlock retry attempts, matches
Signature · 1 line
2.20.1
Vitaly Kuznetsov
maintainerRe: [PATCH v2 2/2] x86/kvm/hyper-v: recommend using eVMCS only when it is enabled
Quoted 4 lines · Vitaly Kuznetsov
We shouldn't probably be suggesting using Enlightened VMCS when it's not enabled (not supported from guest's point of view). Hyper-V on KVM seems to be fine either way but let's be consistent.
is missing here. Hope it can be added upon commit.
Quoted 20 lines
Reviewed-by Liran Alon <[email protected]>Signed-off-by Vitaly Kuznetsov <[email protected]>--- arch/x86/kvm/hyperv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)arch/x86/kvm/hyperv.c +2
-1@@ -1850,7 +1850,8 @@ int kvm_vcpu_ioctl_get_hv_cpuid(struct kvm_vcpu *vcpu, struct kvm_cpuid2 *cpuid, ent->eax |=HV_X64_RELAXED_TIMING_RECOMMENDED ; ent->eax |=HV_X64_CLUSTER_IPI_RECOMMENDED ; ent->eax |=HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED ; - ent->eax |=HV_X64_ENLIGHTENED_VMCS_RECOMMENDED ; +if (evmcs_ver) + ent->eax |=HV_X64_ENLIGHTENED_VMCS_RECOMMENDED ;/* * Default number of spinlock retry attempts, matches
Signature · 1 line
Vitaly
Paolo Bonzini
maintainerRe: [PATCH v2 2/2] x86/kvm/hyper-v: recommend using eVMCS only when it is enabled
Quoted 1 line · Vitaly Kuznetsov
Fixes 2bc39970e932 ("x86/kvm/hyper-v: Introduce KVM_GET_SUPPORTED_HV_CPUID")
Added, thanks.
Paolo
Quoted 10 lines · Vitaly Kuznetsov
Be more consistent with genuine Hyper-V: don't recommend using Enlightened VMCS when it wasn't enabled, don't advertise reset via synthetic MSR.
Vitaly Kuznetsov (2):
x86/kvm/hyper-v: don't recommend doing reset via synthetic MSR x86/kvm/hyper-v: recommend using eVMCS only when it is enabledarch/x86/kvm/hyperv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Queued, thanks.
Paolo