From: Avi Kivity <avi@redhat.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Modeling x86 early initialization accurately
Date: Thu, 27 Nov 2008 15:28:02 +0200 [thread overview]
Message-ID: <492EA062.1030809@redhat.com> (raw)
In-Reply-To: <492E0066.7040206@gmx.net>
Carl-Daniel Hailfinger wrote:
> Grepping the source code didn't find any code signaling a #GP. I'd be
> thankful for any hints so I can create a patch for this.
>
See helper_wrmsr(), the default: case (which is even commented).
> (And give a warning to the ReactOS developers because their latest code
> will #GP with that change. They read and write MSR 0x0000008b which is
> unimplemented in QEMU).
>
>
This may be an architectural msr (oxymoron, yes) which is guaranteed to
exist. In that case qemu should implement it.
>> If we can detect this, we can handle it with kvm by allocating a
>> memory slot to back the cache. But I don't see how we can detect it
>> reliably (mtrrs are handled completely within the kernel, and I
>> wouldn't want this hack in the kernel).
>>
>
> AFAICS MTRRs of x86 targets are ignored completely by QEMU.
But not kvm.
> They are
> handled as unknown MSR reads/writes and do not fault. See
> target-i386/op_helper.c:helper_rdmsr() and helper_wrmsr(). I'm not
> familiar with how KVM handles the MTRRs and the KVM code in the QEMU
> doesn't provide that many clues. Your statement about MTRR handling in
> the kernel is not entirely clear to me. Are all MSR writes handled in
> the kernel by KVM?
>
> Detection of the CAR mode activation can be performed in two ways,
> depending on how close to hardware we want to get:
> 1. Coreboot specific, triggering on the exact sequence of MSR writes
> performed by coreboot.
>
Definitely not.
> 2. BIOS/firmware agnostic, triggering anytime the cache control bits and
> any of the MTRR MSRs are in the right state.
>
What is the right state? Total writeback memory spanned by MTRRs <=
cache size?
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2008-11-27 13:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-25 22:48 [Qemu-devel] Modeling x86 early initialization accurately Carl-Daniel Hailfinger
2008-11-26 2:04 ` Anthony Liguori
2008-11-26 3:26 ` Carl-Daniel Hailfinger
2008-11-26 16:36 ` Avi Kivity
2008-11-27 2:05 ` Carl-Daniel Hailfinger
2008-11-27 13:28 ` Avi Kivity [this message]
2008-11-27 14:22 ` Carl-Daniel Hailfinger
2008-11-26 11:37 ` Paul Brook
2008-11-26 13:29 ` Carl-Daniel Hailfinger
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=492EA062.1030809@redhat.com \
--to=avi@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 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.