[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 03/15] target/arm: ensure HVF traps set appropriate MemTxAttrs
From: |
Alex Bennée |
Subject: |
[PATCH v3 03/15] target/arm: ensure HVF traps set appropriate MemTxAttrs |
Date: |
Tue, 27 Sep 2022 15:14:52 +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).
Acked-by: Alexander Graf <agraf@csgraf.de>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Mads Ynddal <mads@ynddal.dk>
---
v2
- update MEMTXATTRS macro
---
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..d81fbbb2df 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), &val, len);
} else {
address_space_read(&address_space_memory,
hvf_exit->exception.physical_address,
- MEMTXATTRS_UNSPECIFIED, &val, len);
+ MEMTXATTRS_CPU(cpu), &val, len);
hvf_set_reg(cpu, srt, val);
}
--
2.34.1
- [PATCH v3 00/15] gdbstub/next (MemTxAttrs, re-factoring), Alex Bennée, 2022/09/27
- [PATCH v3 01/15] hw: encode accessing CPU index in MemTxAttrs, Alex Bennée, 2022/09/27
- [PATCH v3 02/15] target/arm: ensure TCG IO accesses set appropriate MemTxAttrs, Alex Bennée, 2022/09/27
- [PATCH v3 03/15] target/arm: ensure HVF traps set appropriate MemTxAttrs,
Alex Bennée <=
- [PATCH v3 08/15] hw/intc/gic: use MxTxAttrs to divine accessing CPU, Alex Bennée, 2022/09/27
- [PATCH v3 05/15] target/arm: ensure ptw accesses set appropriate MemTxAttrs, Alex Bennée, 2022/09/27
- [PATCH v3 10/15] configure: move detected gdb to TCG's config-host.mak, Alex Bennée, 2022/09/27
- [PATCH v3 04/15] target/arm: ensure KVM traps set appropriate MemTxAttrs, Alex Bennée, 2022/09/27
- [PATCH v3 07/15] qtest: make read/write operation appear to be from CPU, Alex Bennée, 2022/09/27