[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 03/11] target/arm: ensure HVF traps set appropriate MemTxAttrs
From: |
Alex Bennée |
Subject: |
[PATCH v2 03/11] target/arm: ensure HVF traps set appropriate MemTxAttrs |
Date: |
Mon, 26 Sep 2022 14:38:56 +0100 |
As most HVF devices are done purely in software we need to make sure
we properly encode the source CPU in MemTxAttrs. This will allow the
device emulations to use those attributes rather than relying on
current_cpu (although current_cpu will still be correct in this case).
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Mads Ynddal <mads@ynddal.dk>
Cc: Alexander Graf <agraf@csgraf.de>
---
target/arm/hvf/hvf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
index 060aa0ccf4..13b7971560 100644
--- a/target/arm/hvf/hvf.c
+++ b/target/arm/hvf/hvf.c
@@ -1233,11 +1233,11 @@ int hvf_vcpu_exec(CPUState *cpu)
val = hvf_get_reg(cpu, srt);
address_space_write(&address_space_memory,
hvf_exit->exception.physical_address,
- MEMTXATTRS_UNSPECIFIED, &val, len);
+ MEMTXATTRS_CPU(cpu->cpu_index), &val, len);
} else {
address_space_read(&address_space_memory,
hvf_exit->exception.physical_address,
- MEMTXATTRS_UNSPECIFIED, &val, len);
+ MEMTXATTRS_CPU(cpu->cpu_index), &val, len);
hvf_set_reg(cpu, srt, val);
}
--
2.34.1
- Re: [PATCH v2 02/11] target/arm: enable tracking of CPU index in MemTxAttrs, (continued)
[PATCH v2 07/11] configure: move detected gdb to TCG's config-host.mak, Alex Bennée, 2022/09/26
[PATCH v2 04/11] qtest: make read/write operation appear to be from CPU, Alex Bennée, 2022/09/26
[PATCH v2 01/11] hw: encode accessing CPU index in MemTxAttrs, Alex Bennée, 2022/09/26
Re: [PATCH v2 01/11] hw: encode accessing CPU index in MemTxAttrs, Alexander Graf, 2022/09/26
[PATCH v2 03/11] target/arm: ensure HVF traps set appropriate MemTxAttrs,
Alex Bennée <=
[PATCH v2 08/11] gdbstub: move into its own sub directory, Alex Bennée, 2022/09/26
[PATCH v2 06/11] hw/timer: convert mptimer access to attrs to derive cpu index, Alex Bennée, 2022/09/26
[PATCH v2 09/11] gdbstub: move sstep flags probing into AccelClass, Alex Bennée, 2022/09/26
[PATCH v2 10/11] gdbstub: move breakpoint logic to accel ops, Alex Bennée, 2022/09/26
[PATCH v2 05/11] hw/intc/gic: use MxTxAttrs to divine accessing CPU, Alex Bennée, 2022/09/26