qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Justin Terry (VM)" <juterry@microsoft.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "rth@twiddle.net" <rth@twiddle.net>,
	"ehabkost@redhat.com" <ehabkost@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] WHPX: register for unrecognized MSR exits
Date: Wed, 13 Jun 2018 18:27:35 +0200	[thread overview]
Message-ID: <dfb2eddc-b582-4175-0109-c752d97ccf34@redhat.com> (raw)
In-Reply-To: <20180605221500.21674-2-juterry@microsoft.com>

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) <juterry@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

  reply	other threads:[~2018-06-13 16:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-05 22:15 [Qemu-devel] [PATCH 1/2] WHPX workaround bug in OSVW handling Justin Terry (VM)
2018-06-05 22:15 ` [Qemu-devel] [PATCH 2/2] WHPX: register for unrecognized MSR exits Justin Terry (VM)
2018-06-13 16:27   ` Paolo Bonzini [this message]
2018-06-18 22:01     ` Justin Terry (VM)
2018-06-19 12:30       ` Paolo Bonzini

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=dfb2eddc-b582-4175-0109-c752d97ccf34@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=juterry@microsoft.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).