* [PATCH v2 0/2] tweak HYPERV_CPUID_ENLIGHTMENT_INFO
@ 2019-01-25 11:19 Vitaly Kuznetsov
2019-01-25 11:19 ` [PATCH v2 1/2] x86/kvm/hyper-v: don't recommend doing reset via synthetic MSR Vitaly Kuznetsov
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Vitaly Kuznetsov @ 2019-01-25 11:19 UTC (permalink / raw)
To: kvm
Cc: Paolo Bonzini, Radim Krčmář,
Roman Kagan, Liran Alon, linux-kernel
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(-)
--
2.20.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/2] x86/kvm/hyper-v: don't recommend doing reset via synthetic MSR
2019-01-25 11:19 [PATCH v2 0/2] tweak HYPERV_CPUID_ENLIGHTMENT_INFO Vitaly Kuznetsov
@ 2019-01-25 11:19 ` Vitaly Kuznetsov
2019-01-25 11:19 ` [PATCH v2 2/2] x86/kvm/hyper-v: recommend using eVMCS only when it is enabled Vitaly Kuznetsov
2019-01-25 17:51 ` [PATCH v2 0/2] tweak HYPERV_CPUID_ENLIGHTMENT_INFO Paolo Bonzini
2 siblings, 0 replies; 6+ messages in thread
From: Vitaly Kuznetsov @ 2019-01-25 11:19 UTC (permalink / raw)
To: kvm
Cc: Paolo Bonzini, Radim Krčmář,
Roman Kagan, Liran Alon, linux-kernel
System reset through synthetic MSR is not recommended neither by genuine
Hyper-V nor my QEMU.
Fixes: 2bc39970e932 ("x86/kvm/hyper-v: Introduce KVM_GET_SUPPORTED_HV_CPUID")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Liran Alon <liran.alon@oracle.com>
---
arch/x86/kvm/hyperv.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index ac44a681f065..4840f5b3c88f 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hyperv.c
@@ -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;
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] x86/kvm/hyper-v: recommend using eVMCS only when it is enabled
2019-01-25 11:19 [PATCH v2 0/2] tweak HYPERV_CPUID_ENLIGHTMENT_INFO Vitaly Kuznetsov
2019-01-25 11:19 ` [PATCH v2 1/2] x86/kvm/hyper-v: don't recommend doing reset via synthetic MSR Vitaly Kuznetsov
@ 2019-01-25 11:19 ` Vitaly Kuznetsov
2019-01-25 11:43 ` Vitaly Kuznetsov
2019-01-25 17:51 ` [PATCH v2 0/2] tweak HYPERV_CPUID_ENLIGHTMENT_INFO Paolo Bonzini
2 siblings, 1 reply; 6+ messages in thread
From: Vitaly Kuznetsov @ 2019-01-25 11:19 UTC (permalink / raw)
To: kvm
Cc: Paolo Bonzini, Radim Krčmář,
Roman Kagan, Liran Alon, linux-kernel
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.
Reviewed-by: Liran Alon <liran.alon@oracle.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
arch/x86/kvm/hyperv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index 4840f5b3c88f..4730fcaa70cf 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hyperv.c
@@ -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
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] x86/kvm/hyper-v: recommend using eVMCS only when it is enabled
2019-01-25 11:19 ` [PATCH v2 2/2] x86/kvm/hyper-v: recommend using eVMCS only when it is enabled Vitaly Kuznetsov
@ 2019-01-25 11:43 ` Vitaly Kuznetsov
2019-01-25 18:11 ` Paolo Bonzini
0 siblings, 1 reply; 6+ messages in thread
From: Vitaly Kuznetsov @ 2019-01-25 11:43 UTC (permalink / raw)
To: kvm
Cc: Paolo Bonzini, Radim Krčmář,
Roman Kagan, Liran Alon, linux-kernel
Vitaly Kuznetsov <vkuznets@redhat.com> writes:
> 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.
>
Fixes: 2bc39970e932 ("x86/kvm/hyper-v: Introduce KVM_GET_SUPPORTED_HV_CPUID")
is missing here. Hope it can be added upon commit.
> Reviewed-by: Liran Alon <liran.alon@oracle.com>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
> arch/x86/kvm/hyperv.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
> index 4840f5b3c88f..4730fcaa70cf 100644
> --- a/arch/x86/kvm/hyperv.c
> +++ b/arch/x86/kvm/hyperv.c
> @@ -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
--
Vitaly
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/2] tweak HYPERV_CPUID_ENLIGHTMENT_INFO
2019-01-25 11:19 [PATCH v2 0/2] tweak HYPERV_CPUID_ENLIGHTMENT_INFO Vitaly Kuznetsov
2019-01-25 11:19 ` [PATCH v2 1/2] x86/kvm/hyper-v: don't recommend doing reset via synthetic MSR Vitaly Kuznetsov
2019-01-25 11:19 ` [PATCH v2 2/2] x86/kvm/hyper-v: recommend using eVMCS only when it is enabled Vitaly Kuznetsov
@ 2019-01-25 17:51 ` Paolo Bonzini
2 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2019-01-25 17:51 UTC (permalink / raw)
To: Vitaly Kuznetsov, kvm
Cc: Radim Krčmář, Roman Kagan, Liran Alon, linux-kernel
On 25/01/19 12:19, Vitaly Kuznetsov wrote:
> 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(-)
>
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] x86/kvm/hyper-v: recommend using eVMCS only when it is enabled
2019-01-25 11:43 ` Vitaly Kuznetsov
@ 2019-01-25 18:11 ` Paolo Bonzini
0 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2019-01-25 18:11 UTC (permalink / raw)
To: Vitaly Kuznetsov, kvm
Cc: Radim Krčmář, Roman Kagan, Liran Alon, linux-kernel
On 25/01/19 12:43, Vitaly Kuznetsov wrote:
> Fixes: 2bc39970e932 ("x86/kvm/hyper-v: Introduce KVM_GET_SUPPORTED_HV_CPUID")
Added, thanks.
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-01-25 18:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-25 11:19 [PATCH v2 0/2] tweak HYPERV_CPUID_ENLIGHTMENT_INFO Vitaly Kuznetsov
2019-01-25 11:19 ` [PATCH v2 1/2] x86/kvm/hyper-v: don't recommend doing reset via synthetic MSR Vitaly Kuznetsov
2019-01-25 11:19 ` [PATCH v2 2/2] x86/kvm/hyper-v: recommend using eVMCS only when it is enabled Vitaly Kuznetsov
2019-01-25 11:43 ` Vitaly Kuznetsov
2019-01-25 18:11 ` Paolo Bonzini
2019-01-25 17:51 ` [PATCH v2 0/2] tweak HYPERV_CPUID_ENLIGHTMENT_INFO Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).