From: Christoph Egger <Christoph.Egger@amd.com>
To: Tim Deegan <Tim.Deegan@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 01/13] Nested Virtualization: tools
Date: Tue, 16 Nov 2010 14:10:57 +0100 [thread overview]
Message-ID: <201011161410.57975.Christoph.Egger@amd.com> (raw)
In-Reply-To: <20101116130340.GA25462@whitby.uk.xensource.com>
On Tuesday 16 November 2010 14:03:40 Tim Deegan wrote:
> At 11:52 +0000 on 16 Nov (1289908371), Christoph Egger wrote:
> > On Tuesday 16 November 2010 12:37:06 Tim Deegan wrote:
> > > Hi,
> > >
> > > At 18:40 +0000 on 12 Nov (1289587225), Christoph Egger wrote:
> > > > +#define SVM_FEATURE_NPT 0x00000001
> > > > +#define SVM_FEATURE_LBRV 0x00000002
> > > > +#define SVM_FEATURE_SVML 0x00000004
> > > > +#define SVM_FEATURE_NRIPS 0x00000008
> > > > +#define SVM_FEATURE_PAUSEFILTER 0x00000400
> > > > +
> > > > + /* Only passthrough SVM features which are implemented */
> > > > + edx = 0;
> > > > + if (regs[3] & SVM_FEATURE_NPT)
> > > > + edx |= SVM_FEATURE_NPT;
> > > > + if (regs[3] & SVM_FEATURE_LBRV)
> > > > + edx |= SVM_FEATURE_LBRV;
> > > > + if (regs[3] & SVM_FEATURE_NRIPS)
> > > > + edx |= SVM_FEATURE_NRIPS;
> > > > + if (regs[3] & SVM_FEATURE_PAUSEFILTER)
> > > > + edx |= SVM_FEATURE_PAUSEFILTER;
> > > > +
> > > > + regs[3] = edx;
> > >
> > > Minor niggle - why isn't this just a single &= operation?
> >
> > The l1 guest shouldn't see upcoming svm features yet.
> > They will be added here when support for them is implemented.
>
> I meant: why don't you or together the feature flags you support
> (which should probably be defined in a header file with the other CPUID
> bits, btw) and just 'regs[3] &= SVM_FEAURE_FOO|SVM_FEATURE_BAR|...'
> instead of using ten lines of code?
Thanks for clarification (and the other people who guessed right).
I changed that in my local tree.
Christoph
--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
next prev parent reply other threads:[~2010-11-16 13:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-12 18:40 [PATCH 01/13] Nested Virtualization: tools Christoph Egger
2010-11-16 11:37 ` Tim Deegan
2010-11-16 11:52 ` Christoph Egger
2010-11-16 12:52 ` George Dunlap
2010-11-16 13:03 ` Tim Deegan
2010-11-16 13:10 ` Christoph Egger [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-10-15 13:10 Christoph Egger
2010-09-01 14:54 Christoph Egger
2010-09-03 7:54 ` Dong, Eddie
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=201011161410.57975.Christoph.Egger@amd.com \
--to=christoph.egger@amd.com \
--cc=Tim.Deegan@citrix.com \
--cc=xen-devel@lists.xensource.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 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.