From: Alexander Graf <agraf@suse.de>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: bwiedemann@suse.de, qemu-devel@nongnu.org, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH] x86: Fix Opteron xlevels
Date: Wed, 22 Apr 2015 16:59:49 +0200 [thread overview]
Message-ID: <5537B765.80701@suse.de> (raw)
In-Reply-To: <20150422142349.GC3466@thinpad.lan.raisama.net>
On 04/22/2015 04:23 PM, Eduardo Habkost wrote:
> On Tue, Apr 21, 2015 at 04:15:14PM +0200, Alexander Graf wrote:
>> On 04/21/2015 04:16 PM, Eduardo Habkost wrote:
>>> On Tue, Apr 21, 2015 at 04:04:21PM +0200, Alexander Graf wrote:
>>>> The AMD Opteron family has different xlevel levels depending on the
>>>> generation. I looked up Gen1, Gen2 and Gen3 hardware and adapted the
>>>> levels according to real silicon.
>>>>
>>>> The reason this came up is that there is a sanity check in KVM making
>>>> sure that SVM is only used when xlevel is high enough. Using real
>>>> hardware levels, they now are.
>>>>
>>>> Reported-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
>>>> Signed-off-by: Alexander Graf <agraf@suse.de>
>>> It needs compatibility properties in HW_COMPAT_2_1. See commit
>>> 6b11322e0f724eb0649fdc324a44288b783023ad for reference.
>> Ah, sure, will do.
>>
>>>> ---
>>>> target-i386/cpu.c | 6 +++---
>>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
>>>> index 03b33cf..d1b1b8c 100644
>>>> --- a/target-i386/cpu.c
>>>> +++ b/target-i386/cpu.c
>>>> @@ -1234,7 +1234,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
>>>> CPUID_EXT2_MTRR | CPUID_EXT2_SYSCALL | CPUID_EXT2_APIC |
>>>> CPUID_EXT2_CX8 | CPUID_EXT2_MCE | CPUID_EXT2_PAE | CPUID_EXT2_MSR |
>>>> CPUID_EXT2_TSC | CPUID_EXT2_PSE | CPUID_EXT2_DE | CPUID_EXT2_FPU,
>>>> - .xlevel = 0x80000008,
>>>> + .xlevel = 0x80000018,
>>> Why did you choose 0x80000018? The highest 0x80000000 leaf we implement
>>> today is 0x8000000A. SVM info is at 0x8000000A.
>> Because it's what real hardware exposes ;).
> Real hardware exposes 0x80000018 because it does return useful
> information in some of the 0x8000000B-0x80000018 leaves.
>
> We don't return anything useful in CPUID leaves above 0x8000000a[1], so
> what exactly are you trying to do by reporting leaves
> 0x8000000B-0x80000018 as available?
Considering that the G4 Opteron exposes 0x1a I'd say we have that
problem already. So if we want to fix the unpopulated leafs, we need to
do that regardless.
Alex
>
> [1] I don't even know what's present in those leaves. I will check the
> Intel and AMD docs right now.
>
next prev parent reply other threads:[~2015-04-22 15:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 14:04 [Qemu-devel] [PATCH] x86: Fix Opteron xlevels Alexander Graf
2015-04-21 14:16 ` Eduardo Habkost
2015-04-21 14:15 ` Alexander Graf
2015-04-22 14:23 ` Eduardo Habkost
2015-04-22 14:59 ` Alexander Graf [this message]
2015-04-22 16:39 ` Eduardo Habkost
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=5537B765.80701@suse.de \
--to=agraf@suse.de \
--cc=afaerber@suse.de \
--cc=bwiedemann@suse.de \
--cc=ehabkost@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).