[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] iommu/quirk: disable shared EPT for Sandybridge and earlier processors.
>>> On 28.08.15 at 17:41, <Anshul Makkar anshul.makkar@xxxxxxxxxx> wrote: > --- a/docs/misc/xen-command-line.markdown > +++ b/docs/misc/xen-command-line.markdown > @@ -896,7 +896,7 @@ debug hypervisor only). > > > `sharept` > > -> Default: `true` > +> Default: `true` if newer than SandyBridge or `false` if Sandybridge or > earlier. This neglects the AMD side. > --- a/xen/drivers/passthrough/iommu.c > +++ b/xen/drivers/passthrough/iommu.c > @@ -54,6 +54,7 @@ bool_t __read_mostly iommu_intremap = 1; > bool_t __read_mostly iommu_hap_pt_share = 1; > bool_t __read_mostly iommu_debug; > bool_t __read_mostly amd_iommu_perdev_intremap = 1; > +bool_t __read_mostly iommu_sharept_set = 0; _If_ you really want to introduce a new variable, it ought to be __initdata (since only __init functions reference it). My preference though would be to make the existing variable a tristate, starting out with a value of -1 (and having type s8). > --- a/xen/drivers/passthrough/vtd/quirks.c > +++ b/xen/drivers/passthrough/vtd/quirks.c > @@ -320,6 +320,19 @@ 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. > + */ > + if ( (boot_cpu_data.x86 == 6) && > + (boot_cpu_data.x86_model <= 0x2a) && !iommu_sharept_set ) > + iommu_hap_pt_share = 0; Model 0x2d certainly is also Sandybridge. Models 0x2c, 0x2e, and 0x2f are even older architectures. And then there are various Atoms at higher numbers which I'm not sure can be considered "newer than Sandybridge" architecture wise. I.e. I don't think you can get away with a simple, single relation here. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |