From: Avi Kivity <avi@redhat.com>
To: Walter Haidinger <walter.haidinger@gmx.at>
Cc: KVM list <kvm@vger.kernel.org>
Subject: Re: OpenBSD 5.0 kernel panic in AMD K10 cpu power state
Date: Thu, 10 Nov 2011 10:46:20 +0200 [thread overview]
Message-ID: <4EBB8F5C.9050305@redhat.com> (raw)
In-Reply-To: <4EBAD609.4050307@gmx.at>
(re-adding cc)
On 11/09/2011 09:35 PM, Walter Haidinger wrote:
> Am 09.11.2011 14:40, schrieb Avi Kivity:
> > Actually, it looks like an OpenBSD bug. According to the AMD
> > documentation:
>
> Well, the OpenBSD developers are very confident that is
> a bug in the KVM cpu emulation and _not_ in OpenBSD.
>
> Basically they say that [despite -cpu host], the emulated
> cpu does not look like a real, but _non-existant_ cpu.
> Virtualization should look like _existing_ hardware.
That is true. But OpenBSD is not following the vendor's recommendation
for how software should access the hardware.
> Since the list archive at
> http://marc.info/?l=openbsd-misc&m=132077741910464&w=2
> lags a bit, I'm attaching some parts of the thread below:
>
> However, please remember it's OpenBSD, so the tone is, let's just
> say, rough.
Less than expected, actually.
> > The panic you hit is for an msr read, not a write. I'm aware those
> > registers are read-only. The CPUID check isn't done, it matches on
> > all family 10 and/or higher AMD processors. They're pretending to be
> > an AMD K10 processor. On all real hardware I've tested this works
> > fine. If you wish to be pedantic, patches are welcome.
So they're actually open to adding the cpuid check.
> They sent me a patch as a workaround, which:
>
> > The previous patch avoids touching the msr at all if ACPI indicates
> > speed scaling is unavailable, this should prevent your panic.
>
> with -cpu host, OpenBSD dmesg showed the 1100T:
> >> cpu0: AMD Phenom(tm) II X6 1100T Processor ("AuthenticAMD" 686-class, 512KB L2 cache) 3.31 GHz cpu0:
> >> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,CX16,POPCNT
> >> ...
> >> bios0: vendor Bochs version "Bochs" date 01/01/2007 bios0: Bochs
> >> Bochs
> > They shouldn't be pretending to be AMD, especially if that emulation
> > is very incompatible.
>
> but the bug is in the Linux KVM:
>
> >> They're pretending to be an AMD K10 processor.
> >>
> > Exactly. What they are doing is wrong. They are pretending to be a
> > AMD K10 processor _badly_, and then they think they can say "oh, but
> > you need to check all these other registers too". A machine with that
> > setup has never physically existed.
>
> Is this all because I used -cpu host?
>
-cpu host is not to blame, you could get the same result from other
combinations of cpu model and family.
I'll look at adding support for this MSR; should be simple. But in
general processor features need to be qualified by cpuid, not by model.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2011-11-10 8:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-08 9:25 OpenBSD 5.0 kernel panic in AMD K10 cpu power state Walter Haidinger
2011-11-09 10:39 ` Avi Kivity
2011-11-09 13:40 ` Avi Kivity
2011-11-09 14:19 ` Walter Haidinger
[not found] ` <4EBAD609.4050307@gmx.at>
2011-11-10 8:46 ` Avi Kivity [this message]
2011-11-10 22:52 ` Andre Przywara
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=4EBB8F5C.9050305@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=walter.haidinger@gmx.at \
/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.