[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] WHPX: register for unrecognized MSR exits
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] WHPX: register for unrecognized MSR exits |
Date: |
Wed, 13 Jun 2018 18:27:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 06/06/2018 00:15, Justin Terry (VM) wrote:
> Some variations of Linux kernels end up accessing MSR's that the Windows
> Hypervisor doesn't implement which causes a GP to be returned to the guest.
> This fix registers QEMU for unimplemented MSR access and globally returns 0 on
> reads and ignores writes. This behavior is allows the Linux kernel to probe
> the
> MSR with a write/read/check sequence it does often without failing the access.
>
> Signed-off-by: Justin Terry (VM) <address@hidden>
> ---
> target/i386/whpx-all.c | 41 ++++++++++++++++++++++++++++++++++++++---
> 1 file changed, 38 insertions(+), 3 deletions(-)
Hmm, KVM tries to list the MSRs that Linux (or Windows :)) use. It can
do the full whitelist, but it's opt-in.
Recent Linux kernels also are generally less picky about #GPs from MSRs,
so I don't think a generic whitelist is a good idea. If the
"non-hosted" Hyper-V is doing the same that would be fine I guess, but
then there should probably be a comment about it in the code.
While this is discussed a bit more, I've queued patch 1.
Thanks,
Paolo