From: "Daniel P. Berrange" <berrange@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: Joerg Roedel <joerg.roedel@amd.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
Avi Kivity <avi@redhat.com>,
kvm@vger.kernel.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/3] qemu-kvm: Invert svm-flag setting logic
Date: Tue, 7 Sep 2010 13:30:16 +0100 [thread overview]
Message-ID: <20100907123016.GA2108@redhat.com> (raw)
In-Reply-To: <D61749EF-AEDB-4017-AF00-BDE87D6C76C2@suse.de>
On Tue, Sep 07, 2010 at 02:23:55PM +0200, Alexander Graf wrote:
>
> On 07.09.2010, at 13:27, Joerg Roedel wrote:
>
> > This patch changes the setting logic for the svm bit in
> > qemu-kvm. The bit is now explicitly set on -enable-nesting
> > instead of masked out if the parameter is not supplied.
> >
> > Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
> > ---
> > target-i386/cpuid.c | 12 ++++++------
> > 1 files changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c
> > index d63fdcb..5fa0dd0 100644
> > --- a/target-i386/cpuid.c
> > +++ b/target-i386/cpuid.c
> > @@ -276,8 +276,8 @@ static x86_def_t builtin_x86_defs[] = {
> > .ext_features = CPUID_EXT_SSE3 | CPUID_EXT_CX16 | CPUID_EXT_POPCNT,
> > .ext2_features = (PPRO_FEATURES & EXT2_FEATURE_MASK) |
> > CPUID_EXT2_LM | CPUID_EXT2_SYSCALL | CPUID_EXT2_NX,
> > - .ext3_features = CPUID_EXT3_LAHF_LM | CPUID_EXT3_SVM |
> > - CPUID_EXT3_ABM | CPUID_EXT3_SSE4A,
> > + .ext3_features = CPUID_EXT3_LAHF_LM | CPUID_EXT3_ABM |
> > + CPUID_EXT3_SSE4A,
> > .xlevel = 0x8000000A,
> > .model_id = "QEMU Virtual CPU version " QEMU_VERSION,
> > },
> > @@ -303,8 +303,8 @@ static x86_def_t builtin_x86_defs[] = {
> > CPUID_EXT3_CR8LEG,
> > CPUID_EXT3_MISALIGNSSE, CPUID_EXT3_3DNOWPREFETCH,
> > CPUID_EXT3_OSVW, CPUID_EXT3_IBS */
> > - .ext3_features = CPUID_EXT3_LAHF_LM | CPUID_EXT3_SVM |
> > - CPUID_EXT3_ABM | CPUID_EXT3_SSE4A,
> > + .ext3_features = CPUID_EXT3_LAHF_LM | CPUID_EXT3_ABM |
> > + CPUID_EXT3_SSE4A,
> > .xlevel = 0x8000001A,
> > .model_id = "AMD Phenom(tm) 9550 Quad-Core Processor"
> > },
> > @@ -1154,8 +1154,8 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
> > /* disable CPU features that KVM cannot support */
> >
> > /* svm */
> > - if (!kvm_nested)
> > - *ecx &= ~CPUID_EXT3_SVM;
> > + if (kvm_nested)
>
> I think we should get rid of kvm_nested and -enable-nesting. Instead, we should enable the SVM bit in the "host" and "qemu64" cpu types, but not in "kvm64". This way users are safe to not use nested svm, but can choose to do so if they like.
>
> Also, it should be possible to do something like -cpu kvm64,flags=+svm. Without having to mess with -enable-nesting.
I agree that its much nicer for mgmt tools if svm/vmx CPU flags can just be
toggled in the normal manner. Might we also want to have a enable/disable
nesting flag, so we can mirror the way real hardware lets you disable virt
in the BIOS even when the CPU(s) have the vmx/svm flags set ?
Regards,
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
next prev parent reply other threads:[~2010-09-07 12:30 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-07 11:27 [Qemu-devel] [PATCH 0/3] Add svm cpuid features to qemu-kvm Joerg Roedel
2010-09-07 11:27 ` [Qemu-devel] [PATCH 1/3] qemu-kvm: Invert svm-flag setting logic Joerg Roedel
2010-09-07 12:23 ` Alexander Graf
2010-09-07 12:30 ` Daniel P. Berrange [this message]
2010-09-07 12:33 ` Alexander Graf
2010-09-07 12:35 ` Avi Kivity
2010-09-07 12:37 ` Alexander Graf
2010-09-07 12:43 ` Avi Kivity
2010-09-07 12:55 ` Alexander Graf
2010-09-07 12:59 ` Avi Kivity
2010-09-07 14:14 ` Roedel, Joerg
2010-09-07 13:51 ` Avi Kivity
2010-09-07 14:12 ` Roedel, Joerg
2010-09-07 14:14 ` Alexander Graf
2010-09-07 14:18 ` Roedel, Joerg
2010-09-07 14:16 ` Alexander Graf
2010-09-07 14:20 ` Roedel, Joerg
2010-09-07 14:22 ` Alexander Graf
2010-09-07 14:33 ` Roedel, Joerg
2010-09-07 14:36 ` Alexander Graf
2010-09-07 14:56 ` Avi Kivity
2010-09-07 11:27 ` [Qemu-devel] [PATCH 2/3] qemu-kvm: Set cpuid definition to 0 before initializing it Joerg Roedel
2010-09-07 11:27 ` [Qemu-devel] [PATCH 3/3] qemu-kvm: Add svm cpuid features Joerg Roedel
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=20100907123016.GA2108@redhat.com \
--to=berrange@redhat.com \
--cc=agraf@suse.de \
--cc=avi@redhat.com \
--cc=joerg.roedel@amd.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).