From: "Jan Beulich" <JBeulich@suse.com>
To: Mohit Gambhir <mohit.gambhir@oracle.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
mgambhir@outlook.com,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
Jun Nakajima <jun.nakajima@intel.com>,
'Boris Ostrovsky' <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH v2] x86/vpmu_intel: Fix hypervisor crash by masking PC bit in MSR_P6_EVNTSEL
Date: Thu, 04 May 2017 01:22:56 -0600 [thread overview]
Message-ID: <590AF2F00200007800156988@prv-mh.provo.novell.com> (raw)
In-Reply-To: <27656d66-760d-57e1-187f-42e14ea44487@oracle.com>
>>> On 03.05.17 at 19:11, <mohit.gambhir@oracle.com> wrote:
>
> On 04/28/2017 02:52 AM, Tian, Kevin wrote:
>>> From: Tian, Kevin
>>> Sent: Friday, April 28, 2017 2:43 PM
>>>
>>>> From: Boris Ostrovsky [mailto:boris.ostrovsky@oracle.com]
>>>> Sent: Thursday, April 27, 2017 11:18 PM
>>>>
>>>> On 04/27/2017 11:05 AM, Jan Beulich wrote:
>>>>>>>> On 27.04.17 at 16:57, <boris.ostrovsky@oracle.com> wrote:
>>>>>> On 04/27/2017 03:32 AM, Jan Beulich wrote:
>>>>>>>>>> On 26.04.17 at 20:50, <mohit.gambhir@oracle.com> wrote:
>>>>>>>> On 04/26/2017 02:19 PM, Andrew Cooper wrote:
>>>>>>>>> On 26/04/17 19:11, Mohit Gambhir wrote:
>>>>>>>>>> Setting Pin Control (PC) bit (19) in MSR_P6_EVNTSEL results in a
>>>> General
>>>>>>>>>> Protection Fault and thus results in a hypervisor crash. This patch
>>>> fixes
>>>>>> the
>>>>>>>>>> crash by masking PC bit and returning an error in case any guest
>>> tries
>>>> to
>>>>>> write
>>>>>>>>>> to it.
>>>>>>>>>>
>>>>>>>>>> Signed-off-by: Mohit Gambhir <mohit.gambhir@oracle.com>
>>>>>>>>> Out of interest, which hardware has this been observed on?
>>>>>>>> I have tested this on two Intel Broadwell machines.
>>>>>>> Since by now all we have are indications that this is an erratum,
>>>>>>> this information belongs into the commit message. As it is written
>>>>>>> now, it means the bit can't be set on any hardware. If there are
>>>>>>> reasons beyond this erratum to uniformly disallow the bit to be
>>>>>>> set by guests, these should be named here too. After all the
>>>>>>> way you do the change, you now refuse values with the bit set
>>>>>>> everywhere.
>>>>>> I don't think this is specific to Broadwell. I tried this on a Haswell
>>>>>> (model 60) and got a #GPF as well.
>>>>>>
>>>>>> If I understand what this bit does, it is pretty pointless in a guest.
>>>>>> It is only useful in some sort of embedded setup, where something is
>>>>>> hooked up to a particular pin on the board. So perhaps this is not an
>>>>>> erratum but rather a not fully documented feature, where if nothing is
>>>>>> connected to that pin this bit should not be set.
>>>>>>
>>>>>> Or maybe it is documented but I can't find anything on that.
>>>>> Kevin, Jun?
>>> I asked internally but didn't get a clarification yet.
>>>
>>>>>> Either way, we should mask this bit.
>>>>> Sure, but: Refuse attempts to set it, or silently ignore such?
>>>> I think the former, especially if what I surmised above is correct ---
>>>> the user shouldn't try to set it.
>>>>
>>> I'm with the former too.
>>>
>> btw regardless of clarification which I'm trying to get, I think we do
>> need disallow such guest operation going to physical MSR. It's not
>> good to have guest impact physical PMU interrupt behavior. Even
>> when we want to support guest PC operation in the future, it needs
>> be emulated as the comment given in KVM side. If others also
>> agree with this assumption, we could check-in this patch w/o
>> mentioning any possible erratum...
> Do we have a consensus on this? Should we push through with this patch
> or any other
> changes/clarifications are required?
Iirc the main thing left at this point is to make the commit message
properly express why the change is being made.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
prev parent reply other threads:[~2017-05-04 7:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-26 18:11 [PATCH v2] x86/vpmu_intel: Fix hypervisor crash by masking PC bit in MSR_P6_EVNTSEL Mohit Gambhir
2017-04-26 18:19 ` Andrew Cooper
2017-04-26 18:50 ` Mohit Gambhir
2017-04-27 7:32 ` Jan Beulich
2017-04-27 14:57 ` Boris Ostrovsky
2017-04-27 15:05 ` Jan Beulich
2017-04-27 15:18 ` Boris Ostrovsky
2017-04-28 6:43 ` Tian, Kevin
[not found] ` <AADFC41AFE54684AB9EE6CBC0274A5D190CBBD78@SHSMSX101.ccr.corp.intel.com>
2017-04-28 6:52 ` Tian, Kevin
2017-04-28 7:37 ` Jan Beulich
2017-05-03 17:11 ` Mohit Gambhir
2017-05-04 7:22 ` Jan Beulich [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=590AF2F00200007800156988@prv-mh.provo.novell.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=mgambhir@outlook.com \
--cc=mohit.gambhir@oracle.com \
--cc=xen-devel@lists.xen.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).