public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Tao Xu <tao3.xu@intel.com>,
	rkrcmar@redhat.com, corbet@lwn.net, tglx@linutronix.de,
	mingo@redhat.com, bp@alien8.de, hpa@zytor.com,
	sean.j.christopherson@intel.com
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	fenghua.yu@intel.com, xiaoyao.li@linux.intel.com,
	jingqi.liu@intel.com
Subject: Re: [PATCH v6 2/3] KVM: vmx: Emulate MSR IA32_UMWAIT_CONTROL
Date: Thu, 11 Jul 2019 15:25:12 +0200	[thread overview]
Message-ID: <43814a5e-12bf-ceb5-e4fb-12bbb32cd4cb@redhat.com> (raw)
In-Reply-To: <20190621055747.17060-3-tao3.xu@intel.com>

On 21/06/19 07:57, Tao Xu wrote:
> +	if (guest_cpuid_has(vcpu, X86_FEATURE_WAITPKG))
> +		atomic_switch_umwait_control_msr(vmx);
> +

guest_cpuid_has is slow.  Please replace it with a test on
secondary_exec_controls_get(vmx).

Are you going to look into nested virtualization support?  This should
include only 1) allowing setting the enable bit in secondary execution
controls, and passing it through in prepare_vmcs02_early; 2) reflecting
the vmexit in nested_vmx_exit_reflected.

Thanks,

Paolo

  parent reply	other threads:[~2019-07-11 13:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-21  5:57 [PATCH v6 0/3] KVM: x86: Enable user wait instructions Tao Xu
2019-06-21  5:57 ` [PATCH v6 1/3] KVM: x86: add support for " Tao Xu
2019-06-21  5:57 ` [PATCH v6 2/3] KVM: vmx: Emulate MSR IA32_UMWAIT_CONTROL Tao Xu
2019-07-03  0:32   ` Tao Xu
2019-07-11 13:25   ` Paolo Bonzini [this message]
2019-07-12  0:42     ` Tao Xu
2019-06-21  5:57 ` [PATCH v6 3/3] KVM: vmx: handle vm-exit for UMWAIT and TPAUSE Tao Xu

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=43814a5e-12bf-ceb5-e4fb-12bbb32cd4cb@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=fenghua.yu@intel.com \
    --cc=hpa@zytor.com \
    --cc=jingqi.liu@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=tao3.xu@intel.com \
    --cc=tglx@linutronix.de \
    --cc=xiaoyao.li@linux.intel.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