qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] [hack] tseg test


From: Gerd Hoffmann
Subject: [Qemu-devel] [PATCH] [hack] tseg test
Date: Mon, 20 Apr 2015 15:25:24 +0200

Put some unique content into tseg area
when locked down for easy testing.
---
 hw/pci-host/q35.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 7d21399..1b2698f 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -200,7 +200,8 @@ static const TypeInfo q35_host_info = {
 
 static uint64_t tseg_blackhole_read(void *ptr, hwaddr reg, unsigned size)
 {
-    return 0xffffffff;
+    static const char msg[] = "No access to tseg for you. ";
+    return msg[reg%sizeof(msg)];
 }
 
 static void tseg_blackhole_write(void *opaque, hwaddr addr, uint64_t val,
@@ -215,8 +216,8 @@ static const MemoryRegionOps tseg_blackhole_ops = {
     .endianness = DEVICE_NATIVE_ENDIAN,
     .valid.min_access_size = 1,
     .valid.max_access_size = 4,
-    .impl.min_access_size = 4,
-    .impl.max_access_size = 4,
+    .impl.min_access_size = 1,
+    .impl.max_access_size = 1,
     .endianness = DEVICE_LITTLE_ENDIAN,
 };
 
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]