[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/18] hw/intc/arm_gicv3: Specify valid and impl in MemoryRegionOp
From: |
Peter Maydell |
Subject: |
[PULL 13/18] hw/intc/arm_gicv3: Specify valid and impl in MemoryRegionOps |
Date: |
Mon, 7 Mar 2022 16:47:04 +0000 |
The GICv3 has some registers that support byte accesses, and some
that support 8-byte accesses. Our TCG implementation implements all
of this, switching on the 'size' argument and handling the registers
that must support reads of that size while logging an error for
attempted accesses to registers that do not support that size access.
However we forgot to tell the core memory subsystem about this by
specifying the .impl and .valid fields in the MemoryRegionOps struct,
so the core was happily simulating 8 byte accesses by combining two 4
byte accesses. This doesn't have much guest-visible effect, since
there aren't many 8 byte registers and they all support being written
in two 4 byte parts.
Set the .impl and .valid fields to say that all sizes from 1 to 8
bytes are both valid and implemented by the device.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220303202341.2232284-4-peter.maydell@linaro.org
---
hw/intc/arm_gicv3.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/intc/arm_gicv3.c b/hw/intc/arm_gicv3.c
index 6d3c8ee231c..0b8f79a1227 100644
--- a/hw/intc/arm_gicv3.c
+++ b/hw/intc/arm_gicv3.c
@@ -369,11 +369,19 @@ static const MemoryRegionOps gic_ops[] = {
.read_with_attrs = gicv3_dist_read,
.write_with_attrs = gicv3_dist_write,
.endianness = DEVICE_NATIVE_ENDIAN,
+ .valid.min_access_size = 1,
+ .valid.max_access_size = 8,
+ .impl.min_access_size = 1,
+ .impl.max_access_size = 8,
},
{
.read_with_attrs = gicv3_redist_read,
.write_with_attrs = gicv3_redist_write,
.endianness = DEVICE_NATIVE_ENDIAN,
+ .valid.min_access_size = 1,
+ .valid.max_access_size = 8,
+ .impl.min_access_size = 1,
+ .impl.max_access_size = 8,
}
};
--
2.25.1
- [PULL 03/18] util: Return valid allocation for qemu_try_memalign() with zero size, (continued)
- [PULL 03/18] util: Return valid allocation for qemu_try_memalign() with zero size, Peter Maydell, 2022/03/07
- [PULL 05/18] util: Share qemu_try_memalign() implementation between POSIX and Windows, Peter Maydell, 2022/03/07
- [PULL 04/18] meson.build: Don't misdetect posix_memalign() on Windows, Peter Maydell, 2022/03/07
- [PULL 07/18] util: Put qemu_vfree() in memalign.c, Peter Maydell, 2022/03/07
- [PULL 06/18] util: Use meson checks for valloc() and memalign() presence, Peter Maydell, 2022/03/07
- [PULL 09/18] target/arm/translate-neon: UNDEF if VLD1/VST1 stride bits are non-zero, Peter Maydell, 2022/03/07
- [PULL 08/18] osdep: Move memalign-related functions to their own header, Peter Maydell, 2022/03/07
- [PULL 10/18] target/arm/translate-neon: Simplify align field check for VLD3, Peter Maydell, 2022/03/07
- [PULL 11/18] hw/intc/arm_gicv3_its: Add trace events for commands, Peter Maydell, 2022/03/07
- [PULL 12/18] hw/intc/arm_gicv3_its: Add trace events for table reads and writes, Peter Maydell, 2022/03/07
- [PULL 13/18] hw/intc/arm_gicv3: Specify valid and impl in MemoryRegionOps,
Peter Maydell <=
- [PULL 14/18] hw/intc/arm_gicv3: Fix missing spaces in error log messages, Peter Maydell, 2022/03/07
- [PULL 15/18] hw/intc/arm_gicv3_cpuif: Fix register names in ICV_HPPIR read trace event, Peter Maydell, 2022/03/07
- [PULL 16/18] ui/cocoa: Use the standard about panel, Peter Maydell, 2022/03/07
- [PULL 17/18] target/arm: Provide cpu property for controling FEAT_LPA2, Peter Maydell, 2022/03/07
- [PULL 18/18] hw/arm/virt: Disable LPA2 for -machine virt-6.2, Peter Maydell, 2022/03/07
- Re: [PULL 00/18] target-arm queue, Peter Maydell, 2022/03/08