linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xiaoyao Li <xiaoyao.li@intel.com>
To: Chenyi Qiang <chenyi.qiang@intel.com>, Jim Mattson <jmattson@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <sean.j.christopherson@intel.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Joerg Roedel <joro@8bytes.org>, kvm list <kvm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/5] KVM: nVMX: Fix VMX controls MSRs setup when nested VMX enabled
Date: Sat, 29 Aug 2020 10:51:47 +0800	[thread overview]
Message-ID: <1fbfb77d-4f28-bcb6-a95c-f4ac7a313d2d@intel.com> (raw)
In-Reply-To: <534a4ad5-b083-1278-a6ac-4a7e2b6b1600@intel.com>

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 <chenyi.qiang@intel.com> 
>> 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.
>>>
>>
>> Aren't these features added conditionally in
>> nested_vmx_entry_exit_ctls_update() and
>> nested_vmx_pmu_entry_exit_ctls_update()?
>>
> 
> Yes, but I assume vmcs_config.nested should reflect the global 
> capability of VMX MSR. KVM supports these two controls, so should be 
> exposed here.

No. I prefer to say they are removed conditionally in 
nested_vmx_entry_exit_ctls_update() and 
nested_vmx_pmu_entry_exit_ctls_update().

Userspace calls vmx_get_msr_feature() to query what KVM supports for 
these VMX MSR. In vmx_get_msr_feature(), it returns the value of 
vmcs_config.nested. As KVM supports these two bits, we should advertise 
them in vmcs_config.nested and report to userspace.

  reply	other threads:[~2020-08-29  2:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28  8:56 [PATCH 0/5] Fix nested VMX controls MSRs Chenyi Qiang
2020-08-28  8:56 ` [PATCH 1/5] KVM: nVMX: Fix VMX controls MSRs setup when nested VMX enabled Chenyi Qiang
2020-08-28 17:43   ` Jim Mattson
2020-08-29  1:49     ` Chenyi Qiang
2020-08-29  2:51       ` Xiaoyao Li [this message]
2020-08-31 17:36         ` Jim Mattson
2020-09-01  3:27   ` Xiaoyao Li
2020-08-28  8:56 ` [PATCH 2/5] KVM: nVMX: Verify the VMX controls MSRs with the global capability when setting VMX MSRs Chenyi Qiang
2020-08-28 18:23   ` Jim Mattson
2020-08-31  3:15     ` Chenyi Qiang
2020-08-28  8:56 ` [PATCH 3/5] KVM: nVMX: Update VMX controls MSR according to guest CPUID after " Chenyi Qiang
2020-08-28 20:39   ` Jim Mattson
2020-09-02 18:16     ` Sean Christopherson
2020-09-02 18:32       ` Jim Mattson
2020-09-11 17:09         ` Paolo Bonzini
2020-08-28  8:56 ` [PATCH 4/5] KVM: nVMX: Fix the update value of nested load IA32_PERF_GLOBAL_CTRL control Chenyi Qiang
2020-08-28 18:29   ` Jim Mattson
2020-08-28  8:56 ` [PATCH 5/5] KVM: nVMX: Simplify the initialization of nested_vmx_msrs Chenyi Qiang
2020-09-11 17:11 ` [PATCH 0/5] Fix nested VMX controls MSRs 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=1fbfb77d-4f28-bcb6-a95c-f4ac7a313d2d@intel.com \
    --to=xiaoyao.li@intel.com \
    --cc=chenyi.qiang@intel.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.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;
as well as URLs for NNTP newsgroup(s).