Re: [RFC PATCH 1/4] hw: encode accessing CPU index in MemTxAttrs

2022-09-16 Thread Peter Maydell
On Wed, 14 Sept 2022 at 17:50, Alex Bennée wrote: > > We currently have hacks across the hw/ to reference current_cpu to > work out what the current accessing CPU is. This breaks in some cases > including using gdbstub to access HW state. As we have MemTxAttrs to > describe details about the acces

Re: [RFC PATCH 1/4] hw: encode accessing CPU index in MemTxAttrs

2022-09-15 Thread Richard Henderson
On 9/14/22 17:09, Alex Bennée wrote: @@ -1340,8 +1340,13 @@ static uint64_t io_readx(CPUArchState *env, CPUIOTLBEntry *iotlbentry, uint64_t val; bool locked = false; MemTxResult r; +MemTxAttrs attrs = iotlbentry->attrs; -section = iotlb_to_section(cpu, iotlbentry->ad

[RFC PATCH 1/4] hw: encode accessing CPU index in MemTxAttrs

2022-09-14 Thread Alex Bennée
We currently have hacks across the hw/ to reference current_cpu to work out what the current accessing CPU is. This breaks in some cases including using gdbstub to access HW state. As we have MemTxAttrs to describe details about the access lets extend it to mention if this is a CPU access and which