linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Hu, Robert" <robert.hu@intel.com>,
	Sean Christopherson <seanjc@google.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] KVM: nVMX: Dynamically compute max VMCS index for vmcs12
Date: Tue, 6 Jul 2021 07:42:46 +0200	[thread overview]
Message-ID: <d98092db-b277-44f5-df5e-f367ecb5a0fc@redhat.com> (raw)
In-Reply-To: <da6c715345954a7b91c044ad685eb0f2@intel.com>

On 06/07/21 05:05, Hu, Robert wrote:
>> As noted in the code comments, KVM allows VMREAD/VMWRITE to all defined
>> fields, whether or not the field should actually exist for the vCPU model doesn't
>> enter into the equation.  That's technically wrong as there are a number of
>> fields that the SDM explicitly states exist iff a certain feature is supported.  To
>> fix that we'd need to add a "feature flag" to vmcs_field_to_offset_table that is
>> checked against the vCPU model, though updating the MSR would probably fall
>> onto userspace's shoulders?
> 
> [Hu, Robert]
> Perhaps more easier and proper to do this in KVM side.
> QEMU sets actual feature set down to KVM, and KVM updates IA32_VMX_VMCS_ENUM
> MSR accordingly. We don't see a channel that QEMU constructs a VMCS and sets a whole
> to KVM.

Yes, it's possible to do that too.  If that is included in Linux 5.14, 
we can remove it from QEMU.

Paolo


  reply	other threads:[~2021-07-06  5:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18 21:46 [PATCH] KVM: nVMX: Dynamically compute max VMCS index for vmcs12 Sean Christopherson
2021-06-21 16:39 ` Paolo Bonzini
2021-06-21 17:08   ` Sean Christopherson
2021-07-06  3:05     ` Hu, Robert
2021-07-06  5:42       ` Paolo Bonzini [this message]
2021-07-21 10:02     ` Hu, Robert
2021-07-21 16:18       ` Sean Christopherson
2021-07-22  2:43         ` Robert Hoo
2021-07-22  7:59 ` Maxim Levitsky
2021-07-22 15:04   ` Sean Christopherson

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=d98092db-b277-44f5-df5e-f367ecb5a0fc@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robert.hu@intel.com \
    --cc=seanjc@google.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).