|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] xen/arm: don't read aarch32 regs when aarch32 isn't available
On 12/01/2021 13:28, Rahul Singh wrote: Hello Julien, Hi Rahul, On 12 Jan 2021, at 11:00 am, Julien Grall <julien@xxxxxxx> wrote: Hi Stefano, On 12/01/2021 00:16, Stefano Stabellini wrote:Don't read aarch32 system registers at boot time when the aarch32 state is not available. They are UNKNOWN, so it is not useful to read them. Moreover, on Cavium ThunderX reading ID_PFR2_EL1 causes a Xen crash. Instead, only read them when aarch32 is available.AArch32 may be supported in EL0 but not in EL1. So I think you want to clarify in the commit message/title which EL you are referring to.Leave the corresponding fields in struct cpuinfo_arm so that they are read-as-zero from a guest. Since we are editing identify_cpu, also fix the indentation: 4 spaces instead of 8.I was going to ask to split that in a separate patch. But then, I noticed that it avoids to change the indentation of the if body twice. So I am ok with that. This statement is correct. For example, if EL3 allows AArch32, then it must be allowed at all lower Exception levels.That means if we are checking the EL1 for AArch32 EL0 should also support AArch32. I think "aarch32 = c->pfr64.el1 == 2” is correct to check. I agree that if EL1 supports AArch32, then it means EL0 will not support.However, if EL1 doesn't support AArch32, then it doesn't imply that EL0 will not support AArch32. Therefore, the check suggested would not be correct because it would prevent 32-bit userspace running on HW (such as IIRC Cortex-A76) that only support AArch32 in EL0. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |