kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Liran Alon <liran.alon@oracle.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH v2] KVM: x86: Modify struct kvm_nested_state to have explicit fields for data
Date: Wed, 19 Jun 2019 01:36:25 +0300	[thread overview]
Message-ID: <D2867F96-6B8D-4A1D-9F6F-CF0F171614BC@oracle.com> (raw)
In-Reply-To: <1560875046-26279-1-git-send-email-pbonzini@redhat.com>



> On 18 Jun 2019, at 19:24, Paolo Bonzini <pbonzini@redhat.com> wrote:
> 
> From: Liran Alon <liran.alon@oracle.com>
> 
> 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.
> 
> Signed-off-by: Liran Alon <liran.alon@oracle.com>
> [Remove SVM stubs, add KVM_STATE_NESTED_VMX_VMCS12_SIZE. - Paolo]

1) Why should we remove SVM stubs? I think it makes the interface intention more clear.
Do you see any disadvantage of having them?

2) What is the advantage of defining a separate KVM_STATE_NESTED_VMX_VMCS12_SIZE
rather than just moving VMCS12_SIZE to userspace header?

-Liran

> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---


  reply	other threads:[~2019-06-18 22:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-18 16:24 [PATCH v2] KVM: x86: Modify struct kvm_nested_state to have explicit fields for data Paolo Bonzini
2019-06-18 22:36 ` Liran Alon [this message]
2019-06-19 10:45   ` Paolo Bonzini
2019-06-19 11:10     ` Liran Alon

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=D2867F96-6B8D-4A1D-9F6F-CF0F171614BC@oracle.com \
    --to=liran.alon@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@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).