On 10.12.2019 11:18, Roger Pau Monné wrote:
> 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.

Because it's a clone, down the road this may be more risky. Here
what we're really interested in is SVM, just that we can't check
the feature flag (because it may not be exposed to us).

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to