Re: [PATCH 4/4] x86/xen: Enumerate NX from CPUID directly

From: Dave Hansen
Date: Thu Apr 04 2024 - 10:25:16 EST


On 4/4/24 03:44, Jürgen Groß wrote:
>> @@ -1306,6 +1306,21 @@ static void __init xen_domu_set_legacy_f
>>     extern void early_xen_iret_patch(void);
>>   +/*
>> + * It is too early for boot_cpu_has() and friends to work.
>> + * Use CPUID to directly enumerate NX support.
>> + */
>> +static inline void xen_configure_nx(void)
>> +{
>> +    bool nx_supported;
>> +    u32 eax = 0;
>
> I'd prefer to name this variable edx.
>
>> +
>> +    get_cpuid_region_leaf(0x80000001, CPUID_EDX, &eax);

Heh. That's a nice way to say it. :)

I'll fix it up.