From: "Roedel, Joerg" <Joerg.Roedel@amd.com>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
Alexander Graf <agraf@suse.de>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [PATCH 3/3] Add svm cpuid features
Date: Tue, 28 Sep 2010 12:05:20 +0200 [thread overview]
Message-ID: <20100928100520.GL9817@amd.com> (raw)
In-Reply-To: <4CA1B776.20105@redhat.com>
On Tue, Sep 28, 2010 at 05:37:58AM -0400, Avi Kivity wrote:
> On 09/28/2010 11:28 AM, Roedel, Joerg wrote:
> > Weird, it worked here as I tested it. I had it on qemu/master and with
> > all three patches. But patch 1 should not make the difference. I take a
> > look, have you pushed the failing uq/master?
>
> Yes, 8fe6a21c76.
>
> > What was your command line?
>
> qemu-system-x86_64 -m 2G -cpu kvm64,+svm,+npt -enable-kvm ...
>
> Note this is qemu.git, so -enable-kvm is needed.
Ok, I apparently forgot to force the CPUID xlevel to be 0x8000000A when
SVM is enabled, probably because I only tested CPUID models where xlevel
already defaults to 0x8000000A. Attached is a fix, thanks for catching
this.
Joerg
>From d18d973d037f1af1869e114aea1f076ea3a1ee7a Mon Sep 17 00:00:00 2001
From: Joerg Roedel <joerg.roedel@amd.com>
Date: Tue, 28 Sep 2010 11:58:49 +0200
Subject: [PATCH 1/1] qemu: Force xlevel to at least 0x8000000A if SVM is enabled
This patch forces the extended CPUID level to be at least
0x8000000A if SVM is enabled in the CPU model.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
target-i386/cpuid.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c
index 0e0bf60..0630fe1 100644
--- a/target-i386/cpuid.c
+++ b/target-i386/cpuid.c
@@ -714,6 +714,11 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model)
x86_cpu_def->ext3_features &= ~minus_ext3_features;
x86_cpu_def->kvm_features &= ~minus_kvm_features;
x86_cpu_def->svm_features &= ~minus_svm_features;
+ if ((x86_cpu_def->ext3_features & CPUID_EXT3_SVM) &&
+ (x86_cpu_def->xlevel < 0x8000000A)) {
+ /* Force xlevel to at least 0x8000000A if SVM enabled */
+ x86_cpu_def->xlevel = 0x8000000A;
+ }
if (check_cpuid) {
if (check_features_against_host(x86_cpu_def) && enforce_cpuid)
goto error;
--
1.7.0.4
--
AMD Operating System Research Center
Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
next prev parent reply other threads:[~2010-09-28 10:05 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-27 13:16 [Qemu-devel] [PATCH 0/3] SVM feature support for qemu v3 Joerg Roedel
2010-09-27 13:16 ` [Qemu-devel] [PATCH 1/3] Make kvm64 the default cpu model when kvm_enabled() Joerg Roedel
2010-10-06 18:53 ` [Qemu-devel] " Marcelo Tosatti
2010-10-06 19:24 ` Anthony Liguori
2010-10-07 8:42 ` Roedel, Joerg
2010-10-07 12:48 ` Anthony Liguori
2010-10-18 8:22 ` Roedel, Joerg
2010-10-18 14:16 ` Anthony Liguori
2010-10-20 15:53 ` Blue Swirl
2010-09-27 13:16 ` [Qemu-devel] [PATCH 2/3] Set cpuid definition to 0 before initializing it Joerg Roedel
2010-09-27 13:16 ` [Qemu-devel] [PATCH 3/3] Add svm cpuid features Joerg Roedel
2010-09-27 14:58 ` [Qemu-devel] " Avi Kivity
2010-09-27 15:02 ` Avi Kivity
2010-09-27 15:40 ` Roedel, Joerg
2010-09-27 16:22 ` Avi Kivity
2010-09-28 9:28 ` Roedel, Joerg
2010-09-28 9:37 ` Avi Kivity
2010-09-28 10:05 ` Roedel, Joerg [this message]
2010-09-28 10:16 ` Avi Kivity
2010-10-06 18:57 ` Marcelo Tosatti
-- strict thread matches above, loose matches on Subject: below --
2010-09-14 15:52 [Qemu-devel] [PATCH 0/3] SVM feature support for qemu Joerg Roedel
2010-09-14 15:52 ` [Qemu-devel] [PATCH 3/3] Add svm cpuid features Joerg Roedel
2010-09-16 14:06 ` [Qemu-devel] " Avi Kivity
2010-09-16 14:12 ` Roedel, Joerg
2010-09-16 14:17 ` Alexander Graf
2010-09-16 14:26 ` Roedel, Joerg
2010-09-16 14:28 ` Alexander Graf
2010-09-16 14:35 ` Roedel, Joerg
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=20100928100520.GL9817@amd.com \
--to=joerg.roedel@amd.com \
--cc=agraf@suse.de \
--cc=avi@redhat.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).