From: Filip Navara <filip.navara@gmail.com>
To: Avi Kivity <avi@redhat.com>
Cc: Andre Przywara <andre.przywara@amd.com>,
aliguori@us.ibm.com, qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] Re: [PATCH 2/2] introduce -cpu host target
Date: Wed, 24 Jun 2009 19:59:33 +0200 [thread overview]
Message-ID: <5b31733c0906241059j43c1f355r9af4ae8d4d270bc0@mail.gmail.com> (raw)
In-Reply-To: <4A426665.1030506@redhat.com>
On Wed, Jun 24, 2009 at 7:46 PM, Avi Kivity<avi@redhat.com> wrote:
> On 06/24/2009 08:37 PM, Filip Navara wrote:
>>
>> On Wed, Jun 24, 2009 at 11:54 AM, Avi Kivity<avi@redhat.com> wrote:
>>
>>>
>>> On 06/23/2009 12:47 AM, Andre Przywara wrote:
>>>
>>>>
>>>> Should we ignore unhandled MSRs like QEMU or Xen do?
>>>>
>>>>
>>>
>>> Ignoring unhandled msrs is dangerous. If a write has some effect the
>>> guest
>>> depends on, and we're not emulating that effect, the guest will fail.
>>> Similarly if you don't know what a register mean, who knows what
>>> returning
>>> zero for a read will do.
>>>
>>
>> It is definitely a bad idea to ignore unknown MSRs. Kernel patch
>> protection scheme used by certain operating system depend on them to
>> work properly and it's pretty hard to debug when you don't know what
>> failed (the MSR read in this case).
>>
>> http://www.uninformed.org/?v=3&a=3
>> http://www.uninformed.org/?v=6&a=1
>> http://www.uninformed.org/?v=8&a=5
>> http://en.wikipedia.org/wiki/Kernel_Patch_Protection
>>
>>
>
> Which unknown msrs are used by kernel patch protection?
It's a moving target. At the time I first got Win64 running on QEMU it
was the one for getting number of implemented virtual address bits
(0x80000008 iirc) and some other for getting cache sizes
(0x80000005/0x80000006 iirc). Both of them were documented in AMD
manuals and not implemented by QEMU. Also the higher bits of virtual
addresses must be treated as sign-extended (as per the information in
the 0x80000008 MSR) even though there are actually bits stored in the
address. Me and Alex Ionescu have spent considerable time by reversing
the PatchGuard v1 and that information is described in more detail in
the first link above. I haven't looked at PatchGuard v2/v3 yet.
Best regards,
Filip Navara
prev parent reply other threads:[~2009-06-24 17:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-22 21:47 [Qemu-devel] [PATCH 2/2] introduce -cpu host target Andre Przywara
2009-06-23 10:04 ` [Qemu-devel] " Avi Kivity
2009-06-24 9:54 ` Avi Kivity
2009-06-24 11:04 ` Andre Przywara
2009-06-24 11:26 ` Avi Kivity
2009-06-24 16:43 ` Jamie Lokier
2009-06-24 17:37 ` Filip Navara
2009-06-24 17:46 ` Avi Kivity
2009-06-24 17:59 ` Filip Navara [this message]
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=5b31733c0906241059j43c1f355r9af4ae8d4d270bc0@mail.gmail.com \
--to=filip.navara@gmail.com \
--cc=aliguori@us.ibm.com \
--cc=andre.przywara@amd.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--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).