Re: [PATCH] xen/arm: don't read aarch32 regs when aarch32 isn't available

2021-01-12 Thread Julien Grall
On Tue, 12 Jan 2021 at 21:05, Stefano Stabellini wrote: > > On Tue, 12 Jan 2021, Julien Grall wrote: > > On Tue, 12 Jan 2021 at 19:09, Stefano Stabellini > > wrote: > > > > > > On Tue, 12 Jan 2021, Julien Grall wrote: > > > > > +aarch32 = c->pfr64.el1 == 2; > > > > > > > > This is checking t

Re: [PATCH] xen/arm: don't read aarch32 regs when aarch32 isn't available

2021-01-12 Thread Stefano Stabellini
On Tue, 12 Jan 2021, Julien Grall wrote: > On Tue, 12 Jan 2021 at 19:09, Stefano Stabellini > wrote: > > > > On Tue, 12 Jan 2021, Julien Grall wrote: > > > > +aarch32 = c->pfr64.el1 == 2; > > > > > > This is checking that AArch32 is available in EL1. However, it may not be > > > the > > > ca

Re: [PATCH] xen/arm: don't read aarch32 regs when aarch32 isn't available

2021-01-12 Thread Julien Grall
On Tue, 12 Jan 2021 at 19:09, Stefano Stabellini wrote: > > On Tue, 12 Jan 2021, Julien Grall wrote: > > > +aarch32 = c->pfr64.el1 == 2; > > > > This is checking that AArch32 is available in EL1. However, it may not be > > the > > case yet it would be available in EL0. > > > > As a consequenc

Re: [PATCH] xen/arm: don't read aarch32 regs when aarch32 isn't available

2021-01-12 Thread Stefano Stabellini
On Tue, 12 Jan 2021, Julien Grall wrote: > > +aarch32 = c->pfr64.el1 == 2; > > This is checking that AArch32 is available in EL1. However, it may not be the > case yet it would be available in EL0. > > As a consequence, 32-bit userspace wouldn't work properly after this patch. > > The Arm Ar

Re: [PATCH] xen/arm: don't read aarch32 regs when aarch32 isn't available

2021-01-12 Thread Bertrand Marquis
Hi, > On 12 Jan 2021, at 14:27, Julien Grall wrote: > > > > On 12/01/2021 13:28, Rahul Singh wrote: >> Hello Julien, > > Hi Rahul, > >>> On 12 Jan 2021, at 11:00 am, Julien Grall wrote: >>> >>> Hi Stefano, >>> >>> On 12/01/2021 00:16, Stefano Stabellini wrote: Don't read aarch32 syst

Re: [PATCH] xen/arm: don't read aarch32 regs when aarch32 isn't available

2021-01-12 Thread Julien Grall
On 12/01/2021 13:28, Rahul Singh wrote: Hello Julien, Hi Rahul, On 12 Jan 2021, at 11:00 am, Julien Grall 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 i

Re: [PATCH] xen/arm: don't read aarch32 regs when aarch32 isn't available

2021-01-12 Thread Rahul Singh
Hello Julien, > On 12 Jan 2021, at 11:00 am, Julien Grall 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

Re: [PATCH] xen/arm: don't read aarch32 regs when aarch32 isn't available

2021-01-12 Thread Bertrand Marquis
Hi Julien, > On 12 Jan 2021, at 12:46, Julien Grall wrote: > > > > On 12/01/2021 10:50, Bertrand Marquis wrote: >> Hi Stefano, >>> On 12 Jan 2021, at 00:16, Stefano Stabellini wrote: >>> >>> Don't read aarch32 system registers at boot time when the aarch32 state >>> is not available. They ar

Re: [PATCH] xen/arm: don't read aarch32 regs when aarch32 isn't available

2021-01-12 Thread Julien Grall
On 12/01/2021 10:50, Bertrand Marquis wrote: Hi Stefano, On 12 Jan 2021, at 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

Re: [PATCH] xen/arm: don't read aarch32 regs when aarch32 isn't available

2021-01-12 Thread Julien Grall
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 wh

Re: [PATCH] xen/arm: don't read aarch32 regs when aarch32 isn't available

2021-01-12 Thread Bertrand Marquis
Hi Stefano, > On 12 Jan 2021, at 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,

[PATCH] xen/arm: don't read aarch32 regs when aarch32 isn't available

2021-01-11 Thread Stefano Stabellini
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. Leave the corresponding fields in st