kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Liran Alon <liran.alon@oracle.com>,
	rkrcmar@redhat.com, kvm@vger.kernel.org
Cc: jmattson@google.com, maran.wilson@oracle.com
Subject: Re: [PATCH] KVM: x86: Modify struct kvm_nested_state to have explicit fields for data
Date: Tue, 18 Jun 2019 18:25:06 +0200	[thread overview]
Message-ID: <c740c43c-1dc0-e7e3-851a-9b0cdc496892@redhat.com> (raw)
In-Reply-To: <20190616120310.128373-1-liran.alon@oracle.com>

On 16/06/19 14:03, Liran Alon wrote:
> Improve the KVM_{GET,SET}_NESTED_STATE structs by detailing the format
> of VMX nested state data in a struct.
> 
> In order to avoid changing the ioctl values of
> KVM_{GET,SET}_NESTED_STATE, there is a need to preserve
> sizeof(struct kvm_nested_state). This is done by defining the data
> struct as "data.vmx[0]". It was the most elegant way I found to
> preserve struct size while still keeping struct readable and easy to
> maintain. It does have a misfortunate side-effect that now it has to be
> accessed as "data.vmx[0]" rather than just "data.vmx".
> 
> Because we are already modifying these structs, I also modified the
> following:
> * Define the "format" field values as macros.
> * Rename vmcs_pa to vmcs12_pa for better readability.
> * Add stub structs for AMD SVM.

I'm not sure it makes sense to add stub structs for SVM yet.  But as
noted in the QEMU patch review we should definitely add VMCS12_SIZE (or
better, a synonym of it that follows the KVM_NESTED_STATE_VMX_* naming).

I have just sent a v2 and I plan to queue it pretty soon.

Paolo

      reply	other threads:[~2019-06-18 16:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-16 12:03 [PATCH] KVM: x86: Modify struct kvm_nested_state to have explicit fields for data Liran Alon
2019-06-18 16:25 ` Paolo Bonzini [this message]

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=c740c43c-1dc0-e7e3-851a-9b0cdc496892@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=liran.alon@oracle.com \
    --cc=maran.wilson@oracle.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;
as well as URLs for NNTP newsgroup(s).