From: Avi Kivity <avi@redhat.com>
To: "Nadav Har'El" <nyh@math.technion.ac.il>
Cc: kvm@vger.kernel.org, Julian Stecklina <js@alien8.de>
Subject: Re: PATCH: nVMX: Better MSR_IA32_FEATURE_CONTROL handling
Date: Wed, 21 Mar 2012 15:09:11 +0200 [thread overview]
Message-ID: <4F69D2F7.4090108@redhat.com> (raw)
In-Reply-To: <20120319165306.GA20643@fermat.math.technion.ac.il>
On 03/19/2012 06:53 PM, Nadav Har'El wrote:
> Hi, in a minute I'll send a new version of the MSR_IA32_FEATURE_CONTROL
> patch for nested VMX; I just wanted to reply first to your comments so
> you'll know what to expect:
>
> On Wed, Mar 07, 2012, Avi Kivity wrote about "Re: PATCH: nVMX: Better MSR_IA32_FEATURE_CONTROL handling":
> > On 03/07/2012 05:58 PM, Nadav Har'El wrote:
> > > + u64 msr_ia32_feature_control;
> > > };
> >
> > Need to add to the list of exported MSRs so it can be live migrated
> > (msrs_to_save).
>
> Did this.
>
> > The variable itself should live in vcpu->arch, even if
> > some bits are vendor specific.
>
> But not this. I understand what you explained about vmx.c being for
> Intel *hosts*, not about emulating Intel *guests*, but I do think that
> since none of the bits in this MSR are relevant on AMD hosts (which
> don't do nested VMX), it isn't useful to support this MSR outside vmx.c.
>
> So I left this variable it in vmx->nested. As I noted earlier, svm.c
> did exactly the same thing (nested.vm_cr_msr), so at least there's
> symmetry here.
Okay.
>
> > > @@ -1999,7 +2000,7 @@ static int vmx_get_vmx_msr(struct kvm_vc
> > >
> > > switch (msr_index) {
> > > case MSR_IA32_FEATURE_CONTROL:
> > > - *pdata = 0;
> > > + *pdata = to_vmx(vcpu)->nested.msr_ia32_feature_control;
> > > break;
> >
> > In a separate patch, please move this outside vmx_get_vmx_msr(). It's
> > not a vmx msr.
>
> Done, but not split into two patches: The patch removes the old case in
> vmx_get_vmx_msr() (and also removes vmx_set_vmx_msr() entirely) and
> instead adds the case in vmx_get_msr() and vmx_set_msr().
>
> > > +#define VMXON_NEEDED_FEATURES \
> > > + (FEATURE_CONTROL_LOCKED | FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX)
> >
> > Use const u64 instead of #define please, it jars my eyes.
>
> I would, if Linux coding style allowed to declare variables in the
> middle of blocks. Unfortunately it doesn't, so I left this #define.
> I don't think it's that bad.
>
Move it to the top of the file, or as a variable at the top of the
function please.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2012-03-21 13:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-07 15:58 PATCH: nVMX: Better MSR_IA32_FEATURE_CONTROL handling Nadav Har'El
2012-03-07 16:18 ` Avi Kivity
2012-03-15 17:40 ` Nadav Har'El
2012-03-15 18:08 ` Avi Kivity
2012-03-19 16:53 ` Nadav Har'El
2012-03-19 17:03 ` Nadav Har'El
2012-03-21 13:09 ` Avi Kivity [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=4F69D2F7.4090108@redhat.com \
--to=avi@redhat.com \
--cc=js@alien8.de \
--cc=kvm@vger.kernel.org \
--cc=nyh@math.technion.ac.il \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.