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) <jute...@microsoft.com> > --- > 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