From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Jan Beulich <JBeulich@suse.com>,
Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
Kevin Tian <kevin.tian@intel.com>,
Jun Nakajima <jun.nakajima@intel.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: Re: [PATCH] x86/HVM: don't give the wrong impression of WRMSR succeeding
Date: Thu, 22 Feb 2018 17:16:38 -0500 [thread overview]
Message-ID: <2aa2cf71-64e1-a810-f194-a4a62279a1ce@oracle.com> (raw)
In-Reply-To: <5A8EF37002000078001AA7AB@prv-mh.provo.novell.com>
On 02/22/2018 10:44 AM, Jan Beulich wrote:
>>>> On 22.02.18 at 15:53, <andrew.cooper3@citrix.com> wrote:
>> On 22/02/18 13:44, Jan Beulich wrote:
>>> ... for unknown 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.
>>>
>>> At the time it went in, commit 013e34f5a6 ("x86: handle paged gfn in
>>> wrmsr_hypervisor_regs") was probably okay, since prior to that the
>>> return value wasn't checked at all. But that's not how we want things
>>> to be handled nowadays.
>>>
>>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>> I agree in principle, but this does have a large potential risk for
>> guests. Any unknown MSR which guests don't check for #GP faults from
>> will now cause the guests to crash.
>>
>> That said, it is the correct direction to go long-term, and we've got to
>> throw the switch some time, but I expect this will cause problems in the
>> short term, especially for migrated-in guests.
> Thinking about this again, the RDMSR side of things already raises
> #GP for inaccessible MSRs. We obviously can't do a probing WRMSR
> in {svm,vmx}_msr_write_intercept(), but couldn't we rdmsr_safe()
> in the "case 0:" block, treating the result as the verdict whether to
> raise #GP to the guest? As the read path does this anyway, we're
> not exposing ourselves to new risks.
What about write-only MSRs?
-boris
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-02-22 22:16 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 [this message]
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
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=2aa2cf71-64e1-a810-f194-a4a62279a1ce@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.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).