From: Malcolm Crossley <malcolm.crossley@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Anshul Makkar <anshul.makkar@citrix.com>
Cc: yang.z.zhang@intel.com, kevin.tian@intel.com, xen-devel@lists.xen.org
Subject: Re: [PATCH] iommu/quirk: disable shared EPT for Sandybridge and earlier processors.
Date: Wed, 25 Nov 2015 15:58:58 +0000 [thread overview]
Message-ID: <5655DAC2.6010004@citrix.com> (raw)
In-Reply-To: <5655E41302000078000B919B@prv-mh.provo.novell.com>
On 25/11/15 15:38, Jan Beulich wrote:
>>>> On 25.11.15 at 16:13, <andrew.cooper3@citrix.com> wrote:
>> On 25/11/15 10:49, Jan Beulich wrote:
>>>>>> On 25.11.15 at 11:28, <andrew.cooper3@citrix.com> wrote:
>>>> On 24/11/15 17:41, Jan Beulich wrote:
>>>>>>>> On 24.11.15 at 18:17, <Anshul Makkar anshul.makkar@citrix.com> wrote:
>>>>>> --- a/xen/drivers/passthrough/vtd/quirks.c
>>>>>> +++ b/xen/drivers/passthrough/vtd/quirks.c
>>>>>> @@ -320,6 +320,20 @@ void __init platform_quirks_init(void)
>>>>>> /* Tylersburg interrupt remap quirk */
>>>>>> if ( iommu_intremap )
>>>>>> tylersburg_intremap_quirk();
>>>>>> +
>>>>>> + /*
>>>>>> + * Disable shared EPT ("sharept") on Sandybridge and older processors
>>>>>> + * by default.
>>>>>> + * SandyBridge has no huge page support for IOTLB which leads to
>> fallback
>>>>>> + * on 4k pages and leads to performance degradation.
>>>>>> + *
>>>>>> + * Shared EPT ("sharept") will be disabled only if user has not
>>>>>> + * provided explicit choice on the command line thus iommu_hap_pt_share
>> is
>>>>>> + * at its initialized value of -1.
>>>>>> + */
>>>>>> + if ( (boot_cpu_data.x86 == 0x06 && (boot_cpu_data.x86_model <= 0x2F ||
>>>>>> + boot_cpu_data.x86_model == 0x36)) && (iommu_hap_pt_share == -1) )
>>>>>> + iommu_hap_pt_share = 0;
>>>>> If we really want to do this, then I think we should key this on
>>>>> EPT but not VT-d having 2M support, instead of on CPU models.
>>>> This check is already performed by vtd_ept_page_compatible()
>>> Yeah, I realized there would be such a check on the way home.
>>>
>>>> The problem is that SandyBridge IOMMUs advertise 2M support and do
>>>> function with it, but cannot cache 2MB translations in the IOTLBs.
>>>>
>>>> As a result, attempting to use 2M translations causes substantially
>>>> worse performance than 4K translations.
>>> So commit message and comment should make this more explicit,
>>> to avoid the impression "IOTLB" isn't just the relatively common
>>> mis-naming of "IOMMU".
>>>
>>> Plus I guess the sharing won't need suppressing if !opt_hap_2mb?
>>>
>>> Further the model based check is relatively broad, and includes
>>> Atoms (0x36 actually is one), which can't be considered "Sandybridge
>>> or older" imo.
>>>
>>> And finally I'm not fully convinced using CPU model info to deduce
>>> chipset behavior is entirely correct (albeit perhaps in practice it'll
>>> be fine except maybe when running Xen itself virtualized).
>>
>> What else would you suggest? I can't think of any better identifying
>> information.
>
> Chipset IDs / revisions?
In this case the IOMMU is integrated into the Sandybridge-EP processor itself.
Unfortunately there's no register to query the IOTLB configuration of the IOMMU
and so we're stuck identifying the via the processor model number itself.
Malcolm
>
> Jan
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
>
next prev parent reply other threads:[~2015-11-25 15:58 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-24 17:17 [PATCH] iommu/quirk: disable shared EPT for Sandybridge and earlier processors Anshul
2015-11-24 17:41 ` Jan Beulich
2015-11-25 10:28 ` Andrew Cooper
2015-11-25 10:49 ` Jan Beulich
2015-11-25 15:13 ` Andrew Cooper
2015-11-25 15:38 ` Jan Beulich
2015-11-25 15:58 ` Malcolm Crossley [this message]
2015-11-26 7:17 ` Tian, Kevin
2015-12-01 16:45 ` Anshul Makkar
2015-12-01 17:20 ` Jan Beulich
2015-11-26 8:45 ` Jan Beulich
2015-11-26 10:27 ` Andrew Cooper
2015-11-26 10:39 ` Jan Beulich
2015-11-26 11:42 ` Andrew Cooper
2015-11-26 11:53 ` Jan Beulich
2015-11-26 13:46 ` Jan Beulich
2015-11-26 13:48 ` Malcolm Crossley
2015-11-26 13:55 ` Andrew Cooper
2015-11-30 21:22 ` Konrad Rzeszutek Wilk
2015-12-01 10:34 ` Andrew Cooper
2015-12-01 10:44 ` Anshul Makkar
2015-12-01 15:24 ` Konrad Rzeszutek Wilk
2015-12-01 16:19 ` Andrew Cooper
2015-12-03 1:19 ` Tian, Kevin
2015-12-03 11:24 ` Andrew Cooper
2015-12-04 1:55 ` Tian, Kevin
2015-12-03 2:40 ` Tian, Kevin
2015-12-03 8:18 ` Jan Beulich
2015-12-03 8:50 ` Tian, Kevin
2015-12-03 11:19 ` Andrew Cooper
2015-12-04 2:35 ` Tian, Kevin
[not found] <1440776507-30218-1-git-send-email-anshul.makkar@citrix.com>
2015-08-28 16:24 ` Andrew Cooper
2015-08-31 8:09 ` Jan Beulich
2015-09-01 14:18 ` Andrew Cooper
2015-09-01 14:55 ` 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=5655DAC2.6010004@citrix.com \
--to=malcolm.crossley@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=anshul.makkar@citrix.com \
--cc=kevin.tian@intel.com \
--cc=xen-devel@lists.xen.org \
--cc=yang.z.zhang@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.