[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 6/6] memory: Use CPU register size as default access_size_max
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH 6/6] memory: Use CPU register size as default access_size_max |
Date: |
Sun, 31 May 2020 19:54:25 +0200 |
Do not restrict 64-bit CPU to 32-bit max access by default.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
RFC because this probably require an audit of all devices
used on 64-bit targets.
But if we find such problematic devices, they should instead
enforce their access_size_max = 4 rather than expecting the
default value to be valid...
---
memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/memory.c b/memory.c
index fd6f3d6aca..1d6bb5cdb0 100644
--- a/memory.c
+++ b/memory.c
@@ -1370,7 +1370,7 @@ bool memory_region_access_valid(MemoryRegion *mr,
access_size_max = mr->ops->valid.max_access_size;
if (!mr->ops->valid.max_access_size) {
- access_size_max = 4;
+ access_size_max = TARGET_LONG_SIZE;
}
access_size = MAX(MIN(size, access_size_max), access_size_min);
--
2.21.3
- [PATCH 0/6] exec/memory: Rework some address and access size limits, Philippe Mathieu-Daudé, 2020/05/31
- [PATCH 1/6] target/s390x/mmu_helper: Use address_space_rw() in place, Philippe Mathieu-Daudé, 2020/05/31
- [PATCH 3/6] hw/sd/allwinner-sdhost: Do DMA accesses via DMA address space, Philippe Mathieu-Daudé, 2020/05/31
- [PATCH 2/6] hw/dma/rc4030: Use DMA address space to do DMA accesses, Philippe Mathieu-Daudé, 2020/05/31
- [PATCH 4/6] exec/cpu-common: Do not restrict CPU to 32-bit memory access maximum, Philippe Mathieu-Daudé, 2020/05/31
- [PATCH 5/6] exec: Restrict 32-bit CPUs to 32-bit address space, Philippe Mathieu-Daudé, 2020/05/31
- [RFC PATCH 6/6] memory: Use CPU register size as default access_size_max,
Philippe Mathieu-Daudé <=
- Re: [PATCH 0/6] exec/memory: Rework some address and access size limits, no-reply, 2020/05/31