From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Kevin Tian <kevin.tian@intel.com>,
Jun Nakajima <jun.nakajima@intel.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: Re: [PATCH v2] x86/HVM: don't give the wrong impression of WRMSR succeeding
Date: Mon, 26 Feb 2018 13:18:28 +0000 [thread overview]
Message-ID: <b4c1e7d8-6967-4702-4fa6-c4d8560322dc@citrix.com> (raw)
In-Reply-To: <5A8FE09E02000078001AABC6@prv-mh.provo.novell.com>
On 23/02/18 08:36, Jan Beulich wrote:
> ... for non-existent MSRs: wrmsr_hypervisor_regs()'s comment clearly
> says that the function returns 0 for unrecognized MSRs, so
> {svm,vmx}_msr_write_intercept() should not convert this into success. We
> don't want to unconditionally fail the access though, as we can't be
> certain the list of handled MSRs is complete enough for the guest types
> we care about, so instead mirror what we do on the read paths and probe
> the MSR to decide whether to raise #GP.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Having thought this through:
At the moment, a write to any unhandled MSR is treated as silent write
discard. This is terrible behaviour from the guests point of view.
With this patch in place, a write to any unreadable MSR yields #GP,
which is better behaviour.
The only write-only MSRs I'm aware of are in the x2apic block, and
MSR_PRED_CMD, all of which are explicitly handled.
Therefore, Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>, as
this is an improvement in behaviour, even if the result still isn't great.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
prev parent reply other threads:[~2018-02-26 13:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-22 13:44 [PATCH] x86/HVM: don't give the wrong impression of WRMSR succeeding Jan Beulich
2018-02-22 14:49 ` Boris Ostrovsky
2018-02-22 14:53 ` Andrew Cooper
2018-02-22 15:00 ` Jan Beulich
2018-02-22 15:17 ` Andrew Cooper
2018-02-22 15:44 ` Jan Beulich
2018-02-22 22:16 ` Boris Ostrovsky
2018-02-23 7:55 ` Jan Beulich
2018-02-27 8:39 ` Jan Beulich
2018-02-27 14:07 ` Boris Ostrovsky
2018-02-23 8:36 ` [PATCH v2] " Jan Beulich
2018-02-23 10:07 ` Andrew Cooper
2018-02-23 10:12 ` Jan Beulich
2018-02-24 3:20 ` Tian, Kevin
2018-02-26 13:18 ` Andrew Cooper [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=b4c1e7d8-6967-4702-4fa6-c4d8560322dc@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=xen-devel@lists.xenproject.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).