Re: [PATCH 3/3] arm64/hw_breakpoint: Enable FEAT_Debugv8p9
From: Mark Rutland
Date: Mon Oct 28 2024 - 08:48:18 EST
On Wed, Oct 23, 2024 at 01:01:52PM +0530, Anshuman Khandual wrote:
>
>
> On 10/22/24 21:04, Mark Rutland wrote:
> > On Tue, Oct 01, 2024 at 10:06:02AM +0530, Anshuman Khandual wrote:
[...]
> > Wherever this lives it needs a comment explaining what it is doing and
> > why. I assume this is intended to protect the bank in sequences like:
> >
> > MSR MDSELR, <...>
> > ISB
> > MRS <..._, BANKED_REGISTER
>
> Correct, it is protecting the above sequence.
>
> >
> > ... but is theat suffucient for mutual exclusion against
> > exception handlers, or does that come from somewhere else?
>
> Looking at all existing use cases for breakpoint/watchpoints, it should
> be sufficient to protect against mutual exclusion. But thinking, do you
> have a particular exception handler scenario in mind where this might
> still be problematic ? Will keep looking into it.
Where does the mutual exclusion come from for the existing sequences?
We should be able to descrive should be able to describe that in the
commit message or in a comment somewhere (or better, with some
assertions that get tested).
For example, what prevents watchpoint_handler() from firing in the
middle of arch_install_hw_breakpoint() or
arch_uninstall_hw_breakpoint()?
Is the existing code correct?
Mark.