[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] exec: flush CPU TB cache when breakpoint address translation f
From: |
Paolo Bonzini |
Subject: |
Re: [RFC] exec: flush CPU TB cache when breakpoint address translation fails |
Date: |
Wed, 27 Nov 2019 17:36:31 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 |
On 26/11/19 23:26, Max Filippov wrote:
> When a breakpoint is inserted at location for which there's currently no
> virtual to physical translation no action is taken on CPU TB cache. If a
> TB for that virtual address already exists but is not visible ATM the
> breakpoint won't be hit next time an instruction at that address will be
> executed.
>
> Flush entire CPU TB cache when a breakpoint is set for a virtual address
> that cannot be translated to physical address.
>
> This change fixes the following workflow:
> - linux user application is running
> - a breakpoint is inserted from QEMU gdbstub for a user address that is
> not currently present in the target CPU TLB
> - an instruction at that address is executed, but the external debugger
> doesn't get control.
That's quite heavyweight, but perhaps since it's debugging we might as
well _always_ just flush the TB cache?
In any case, it deserves a comment in the code.
Paolo