[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH] xen/arm: check on domain type against hardware support
On 09/29/2014 01:35 PM, Ian Campbell wrote: >>>> I propose cpu_has_aarch32 to check for both A32 and T32. If any one >>>> (A32/T32) is set we >>>> can assume that aarch32 is supported. For ARM64 that supports only >>>> Aarch64 ID_PFR0_EL1 is RES0. so this check for T32 | A32 should work. >>>> Something like this >>>> >>>> diff --git a/xen/include/asm-arm/cpufeature.h >>>> b/xen/include/asm-arm/cpufeature.h >>>> index 7a6d3de..379e366 100644 >>>> --- a/xen/include/asm-arm/cpufeature.h >>>> +++ b/xen/include/asm-arm/cpufeature.h >>>> @@ -22,7 +22,9 @@ >>>> #define boot_cpu_feature32(feat) (boot_cpu_data.pfr32.feat) >>>> >>>> -#define cpu_has_aarch32 (boot_cpu_feature32(arm) == 1) >>>> +#define cpu_has_a32 ((boot_cpu_feature32(arm) == 1) >>>> #define cpu_has_thumb (boot_cpu_feature32(thumb) >= 1) >>>> +#define cpu_has_aarch32 (cpu_has_a32 || cpu_has_thumb) >>> >>> Yes, this looks like what is needed, thanks. >> >> Following my comment above, I don't think this change is necessary. > > Iff you are right about v8. You are probably right but it's not 100% > clear. On the other hand checking for what we actually mean has no > downside. The downside is name readability for the developer as the term A32 has been introduced on ARMv8. With only the ARMv7 spec the name is very confusing. I had to read the ARMv8 spec to completely understand the name and the different between aarch32 and a32. I would at least add a comment on top of cpu_has_a32. Regards, Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |