public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: kvm@vger.kernel.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Roman Kagan" <rkagan@virtuozzo.com>,
	"Liran Alon" <liran.alon@oracle.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] x86/kvm/hyper-v: recommend using eVMCS only when it is enabled
Date: Fri, 25 Jan 2019 12:43:33 +0100	[thread overview]
Message-ID: <87h8dxnesa.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <20190125111934.28782-3-vkuznets@redhat.com>

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

  reply	other threads:[~2019-01-25 11:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2019-01-25 18:11     ` Paolo Bonzini
2019-01-25 17:51 ` [PATCH v2 0/2] tweak HYPERV_CPUID_ENLIGHTMENT_INFO Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h8dxnesa.fsf@vitty.brq.redhat.com \
    --to=vkuznets@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liran.alon@oracle.com \
    --cc=pbonzini@redhat.com \
    --cc=rkagan@virtuozzo.com \
    --cc=rkrcmar@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox