Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-09-12 Thread Joey Gouly
On Thu, Sep 12, 2024 at 11:50:18AM +0100, Will Deacon wrote: > Hi Dave, > > On Wed, Sep 11, 2024 at 08:33:54AM -0700, Dave Hansen wrote: > > On 9/11/24 08:01, Kevin Brodsky wrote: > > > On 22/08/2024 17:10, Joey Gouly wrote: > > >> @@ -371,6 +382,9 @@ int copy_thread(struct task_struct *p, const s

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-09-12 Thread Will Deacon
Hi Dave, On Wed, Sep 11, 2024 at 08:33:54AM -0700, Dave Hansen wrote: > On 9/11/24 08:01, Kevin Brodsky wrote: > > On 22/08/2024 17:10, Joey Gouly wrote: > >> @@ -371,6 +382,9 @@ int copy_thread(struct task_struct *p, const struct > >> kernel_clone_args *args) > >>if (system_supports_

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-09-11 Thread Dave Hansen
On 9/11/24 08:01, Kevin Brodsky wrote: > On 22/08/2024 17:10, Joey Gouly wrote: >> @@ -371,6 +382,9 @@ int copy_thread(struct task_struct *p, const struct >> kernel_clone_args *args) >> if (system_supports_tpidr2()) >> p->thread.tpidr2_el0 = read_sysreg_s(SYS_TPID

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-09-11 Thread Kevin Brodsky
On 22/08/2024 17:10, Joey Gouly wrote: > @@ -371,6 +382,9 @@ int copy_thread(struct task_struct *p, const struct > kernel_clone_args *args) > if (system_supports_tpidr2()) > p->thread.tpidr2_el0 = read_sysreg_s(SYS_TPIDR2_EL0); > > + if (system_sup

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-09-05 Thread Joey Gouly
On Wed, Sep 04, 2024 at 05:17:58PM +0100, Will Deacon wrote: > On Wed, Sep 04, 2024 at 01:55:03PM +0100, Joey Gouly wrote: > > On Wed, Sep 04, 2024 at 12:43:02PM +0100, Will Deacon wrote: > > > Right, there's quite a lot I need to do: > > > > > > - Uncorrupt your patches > > > - Fix the conflict i

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-09-04 Thread Marc Zyngier
On Wed, 04 Sep 2024 17:17:58 +0100, Will Deacon wrote: > > On Wed, Sep 04, 2024 at 01:55:03PM +0100, Joey Gouly wrote: > > On Wed, Sep 04, 2024 at 12:43:02PM +0100, Will Deacon wrote: > > > Right, there's quite a lot I need to do: > > > > > > - Uncorrupt your patches > > > - Fix the conflict in

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-09-04 Thread Will Deacon
On Wed, Sep 04, 2024 at 01:55:03PM +0100, Joey Gouly wrote: > On Wed, Sep 04, 2024 at 12:43:02PM +0100, Will Deacon wrote: > > Right, there's quite a lot I need to do: > > > > - Uncorrupt your patches > > - Fix the conflict in the kvm selftests > > - Drop the unnecessary ISBs > > - Fix the ESR che

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-09-04 Thread Joey Gouly
On Wed, Sep 04, 2024 at 12:43:02PM +0100, Will Deacon wrote: > On Wed, Sep 04, 2024 at 12:32:21PM +0100, Joey Gouly wrote: > > On Wed, Sep 04, 2024 at 11:22:54AM +0100, Will Deacon wrote: > > > On Tue, Sep 03, 2024 at 03:54:13PM +0100, Joey Gouly wrote: > > > > On Mon, Sep 02, 2024 at 08:08:08PM +0

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-09-04 Thread Will Deacon
On Wed, Sep 04, 2024 at 12:32:21PM +0100, Joey Gouly wrote: > On Wed, Sep 04, 2024 at 11:22:54AM +0100, Will Deacon wrote: > > On Tue, Sep 03, 2024 at 03:54:13PM +0100, Joey Gouly wrote: > > > On Mon, Sep 02, 2024 at 08:08:08PM +0100, Catalin Marinas wrote: > > > > On Tue, Aug 27, 2024 at 12:38:04P

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-09-04 Thread Catalin Marinas
On Wed, Sep 04, 2024 at 11:22:54AM +0100, Will Deacon wrote: > On Tue, Sep 03, 2024 at 03:54:13PM +0100, Joey Gouly wrote: > > commit 3141fb86bee8d48ae47cab1594dad54f974a8899 > > Author: Joey Gouly > > Date: Tue Sep 3 15:47:26 2024 +0100 > > > > fixup! arm64: context switch POR_EL0 register

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-09-04 Thread Joey Gouly
On Wed, Sep 04, 2024 at 11:22:54AM +0100, Will Deacon wrote: > On Tue, Sep 03, 2024 at 03:54:13PM +0100, Joey Gouly wrote: > > On Mon, Sep 02, 2024 at 08:08:08PM +0100, Catalin Marinas wrote: > > > On Tue, Aug 27, 2024 at 12:38:04PM +0100, Will Deacon wrote: > > > > On Fri, Aug 23, 2024 at 07:40:52

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-09-04 Thread Will Deacon
On Tue, Sep 03, 2024 at 03:54:13PM +0100, Joey Gouly wrote: > On Mon, Sep 02, 2024 at 08:08:08PM +0100, Catalin Marinas wrote: > > On Tue, Aug 27, 2024 at 12:38:04PM +0100, Will Deacon wrote: > > > On Fri, Aug 23, 2024 at 07:40:52PM +0100, Catalin Marinas wrote: > > > > On Fri, Aug 23, 2024 at 06:0

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-09-03 Thread Joey Gouly
On Mon, Sep 02, 2024 at 08:08:08PM +0100, Catalin Marinas wrote: > On Tue, Aug 27, 2024 at 12:38:04PM +0100, Will Deacon wrote: > > On Fri, Aug 23, 2024 at 07:40:52PM +0100, Catalin Marinas wrote: > > > On Fri, Aug 23, 2024 at 06:08:36PM +0100, Will Deacon wrote: > > > > On Fri, Aug 23, 2024 at 05:

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-09-02 Thread Catalin Marinas
On Tue, Aug 27, 2024 at 12:38:04PM +0100, Will Deacon wrote: > On Fri, Aug 23, 2024 at 07:40:52PM +0100, Catalin Marinas wrote: > > On Fri, Aug 23, 2024 at 06:08:36PM +0100, Will Deacon wrote: > > > On Fri, Aug 23, 2024 at 05:41:06PM +0100, Catalin Marinas wrote: > > > > On Fri, Aug 23, 2024 at 03:

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-08-27 Thread Will Deacon
On Fri, Aug 23, 2024 at 07:40:52PM +0100, Catalin Marinas wrote: > On Fri, Aug 23, 2024 at 06:08:36PM +0100, Will Deacon wrote: > > On Fri, Aug 23, 2024 at 05:41:06PM +0100, Catalin Marinas wrote: > > > On Fri, Aug 23, 2024 at 03:45:32PM +0100, Will Deacon wrote: > > > > On Thu, Aug 22, 2024 at 04:

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-08-23 Thread Catalin Marinas
On Fri, Aug 23, 2024 at 06:08:36PM +0100, Will Deacon wrote: > On Fri, Aug 23, 2024 at 05:41:06PM +0100, Catalin Marinas wrote: > > On Fri, Aug 23, 2024 at 03:45:32PM +0100, Will Deacon wrote: > > > On Thu, Aug 22, 2024 at 04:10:49PM +0100, Joey Gouly wrote: > > > > +static void permission_overlay_

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-08-23 Thread Will Deacon
On Fri, Aug 23, 2024 at 05:41:06PM +0100, Catalin Marinas wrote: > On Fri, Aug 23, 2024 at 03:45:32PM +0100, Will Deacon wrote: > > On Thu, Aug 22, 2024 at 04:10:49PM +0100, Joey Gouly wrote: > > > +static void permission_overlay_switch(struct task_struct *next) > > > +{ > > > + if (!system_support

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-08-23 Thread Catalin Marinas
On Fri, Aug 23, 2024 at 03:45:32PM +0100, Will Deacon wrote: > On Thu, Aug 22, 2024 at 04:10:49PM +0100, Joey Gouly wrote: > > +static void permission_overlay_switch(struct task_struct *next) > > +{ > > + if (!system_supports_poe()) > > + return; > > + > > + current->thread.por_el0 =

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-08-23 Thread Will Deacon
On Thu, Aug 22, 2024 at 04:10:49PM +0100, Joey Gouly wrote: > POR_EL0 is a register that can be modified by userspace directly, > so it must be context switched. > > Signed-off-by: Joey Gouly > Cc: Catalin Marinas > Cc: Will Deacon > Reviewed-by: Catalin Marinas > --- > arch/arm64/include/asm

[PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-08-22 Thread Joey Gouly
POR_EL0 is a register that can be modified by userspace directly, so it must be context switched. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Catalin Marinas --- arch/arm64/include/asm/cpufeature.h | 6 ++ arch/arm64/include/asm/processor.h | 1 + arch/ar