From: Mohit Gambhir <mohit.gambhir@oracle.com>
To: "Tian, Kevin" <kevin.tian@intel.com>,
'Boris Ostrovsky' <boris.ostrovsky@oracle.com>,
Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
mgambhir@outlook.com, "Nakajima, Jun" <jun.nakajima@intel.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v2] x86/vpmu_intel: Fix hypervisor crash by masking PC bit in MSR_P6_EVNTSEL
Date: Wed, 3 May 2017 13:11:20 -0400 [thread overview]
Message-ID: <27656d66-760d-57e1-187f-42e14ea44487@oracle.com> (raw)
In-Reply-To: <AADFC41AFE54684AB9EE6CBC0274A5D190CBBDD1@SHSMSX101.ccr.corp.intel.com>
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?
+ my personal email id.
> Thanks
> Kevin
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> https://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-05-03 17:11 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 [this message]
2017-05-04 7:22 ` Jan Beulich
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=27656d66-760d-57e1-187f-42e14ea44487@oracle.com \
--to=mohit.gambhir@oracle.com \
--cc=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=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).