|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4] x86: do not enable global pages when virtualized on AMD hardware
On Tue, Dec 10, 2019 at 11:11:18AM +0100, Jan Beulich wrote:
> On 09.12.2019 18:37, Roger Pau Monne wrote:
> > --- a/xen/arch/x86/pv/domain.c
> > +++ b/xen/arch/x86/pv/domain.c
> > @@ -118,6 +118,19 @@ unsigned long pv_fixup_guest_cr4(const struct vcpu *v,
> > unsigned long cr4)
> > (mmu_cr4_features & PV_CR4_GUEST_VISIBLE_MASK));
> > }
> >
> > +static int8_t __read_mostly opt_global_pages = -1;
> > +boolean_runtime_param("global-pages", opt_global_pages);
> > +
> > +static int __init pge_init(void)
> > +{
> > + if ( opt_global_pages == -1 )
> > + opt_global_pages = !cpu_has_hypervisor ||
> > + boot_cpu_data.x86_vendor != X86_VENDOR_AMD;
>
> I was about to commit this when I noticed - what about Hygon here?
Oh the vendor ID is different albeit it's just a clone. Please feel
free to add it at commit.
I also wonder: it might be good to have some kind of macro that
matches both AMD and Hygon (IS_AMD_COMPAT or some such) in order to
avoid this kind of mistakes in the future.
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |