qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 4/4] target/arm: Add arm_gdb_set_sysreg() cal


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v3 4/4] target/arm: Add arm_gdb_set_sysreg() callback
Date: Wed, 28 Feb 2018 12:27:27 +0000

On 28 February 2018 at 11:01, Abdallah Bouassida
<address@hidden> wrote:
> This is a callback to set the cp-regs registered by the dynamic XML.
>
> Signed-off-by: Abdallah Bouassida <address@hidden>
> ---
>>> Some of our customers need to connect to Qemu using our tool TRACE32®
>>> via GDB,
>>> and for some use case they need to have write access to some particular
>>> cpregs.
>>> So, it will be nice to have this capability!
>>> Usually, a user won't modify these registers unless he knows what he is
>>> doing!
>
>> I also still don't really like using write_raw_cp_reg() here --
>> it will bypass some behaviour you want and in some cases will
>> just break the emulation because invariants we assume will
>> hold no longer hold. It would be a lot lot safer to not
>> provide write access at all, only read access.
>
> Adding to that our customers may need this write access, our tool TRACE32®
> needs this also in some particular cases. For example: temporary disabling MMU
> to do a physical memory access.

By clearing the SCTLR bit? That's a good example of a case that
won't work reliably. If you clear the SCTLR.M bit via raw_write
this will not perform the tlb_flush() that it needs to, which
means that if anything does a memory access via the QEMU TLB
it may get the wrong cached results. If you always clear the
bit, do one gdb memory access then set the bit then it will
probably not run into problems but you're walking on thin ice.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]