Re: [PATCH v13 6/7] arm64: mte: Report async tag faults before suspend

2021-02-12 Thread Catalin Marinas
On Thu, Feb 11, 2021 at 03:33:52PM +, Vincenzo Frascino wrote: > void mte_suspend_exit(void) > { > if (!system_supports_mte()) > return; > > update_gcr_el1_excl(gcr_kernel_excl); > + > + /* Clear SYS_TFSR_EL1 after suspend exit */ > + write_sysreg_s(0,

Re: [PATCH v13 6/7] arm64: mte: Report async tag faults before suspend

2021-02-12 Thread Catalin Marinas
On Fri, Feb 12, 2021 at 12:00:15PM +, Lorenzo Pieralisi wrote: > On Thu, Feb 11, 2021 at 03:33:52PM +, Vincenzo Frascino wrote: > > +void mte_suspend_enter(void) > > +{ > > + if (!system_supports_mte()) > > + return; > > + > > + /* > > +* The barriers are required to

Re: [PATCH v13 6/7] arm64: mte: Report async tag faults before suspend

2021-02-12 Thread Vincenzo Frascino
On 2/12/21 12:30 PM, Lorenzo Pieralisi wrote: >> However, I have a question. We are relying on context switch to set >> sctlr_el1_tfc0 right ? If that's the case, till the thread resuming from >> low power switches context we are running with SCTLR_EL1_TCF0 not >> reflecting the actual value. >

Re: [PATCH v13 6/7] arm64: mte: Report async tag faults before suspend

2021-02-12 Thread Lorenzo Pieralisi
On Fri, Feb 12, 2021 at 12:00:15PM +, Lorenzo Pieralisi wrote: > On Thu, Feb 11, 2021 at 03:33:52PM +, Vincenzo Frascino wrote: > > When MTE async mode is enabled TFSR_EL1 contains the accumulative > > asynchronous tag check faults for EL1 and EL0. > > > > During the suspend/resume

Re: [PATCH v13 6/7] arm64: mte: Report async tag faults before suspend

2021-02-12 Thread Lorenzo Pieralisi
On Thu, Feb 11, 2021 at 03:33:52PM +, Vincenzo Frascino wrote: > When MTE async mode is enabled TFSR_EL1 contains the accumulative > asynchronous tag check faults for EL1 and EL0. > > During the suspend/resume operations the firmware might perform some > operations that could change the state

[PATCH v13 6/7] arm64: mte: Report async tag faults before suspend

2021-02-11 Thread Vincenzo Frascino
When MTE async mode is enabled TFSR_EL1 contains the accumulative asynchronous tag check faults for EL1 and EL0. During the suspend/resume operations the firmware might perform some operations that could change the state of the register resulting in a spurious tag check fault report. Report