[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/6] hw/pci-host/sabre: Log reserved address accesses as GUEST_ER
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 6/6] hw/pci-host/sabre: Log reserved address accesses as GUEST_ERROR |
Date: |
Mon, 12 Oct 2020 19:09:50 +0200 |
Report accesses to reserved registers using qemu_log_mask(GUEST_ERROR).
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/pci-host/sabre.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/pci-host/sabre.c b/hw/pci-host/sabre.c
index 67699ac9058..cc97c266a57 100644
--- a/hw/pci-host/sabre.c
+++ b/hw/pci-host/sabre.c
@@ -189,7 +189,11 @@ static void sabre_config_write(void *opaque, hwaddr addr,
case 0xa800 ... 0xa80f: /* Interrupt diagnostics */
case 0xf000 ... 0xf01f: /* FFB config, memory control */
/* we don't care */
+ break;
default:
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "%s: Register 0x%04" HWADDR_PRIX " is reserved\n",
+ __func__, addr);
break;
}
}
@@ -235,7 +239,11 @@ static uint64_t sabre_config_read(void *opaque,
case 0xa800 ... 0xa80f: /* Interrupt diagnostics */
case 0xf000 ... 0xf01f: /* FFB config, memory control */
/* we don't care */
+ break;
default:
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "%s: Register 0x%04" HWADDR_PRIX " is reserved\n",
+ __func__, addr);
break;
}
trace_sabre_config_read(addr, val);
--
2.26.2
- [PATCH 1/6] hw/pci-host/sabre: Update documentation link, (continued)
- [PATCH 1/6] hw/pci-host/sabre: Update documentation link, Philippe Mathieu-Daudé, 2020/10/12
- [PATCH 2/6] hw/pci-host/sabre: Remove superfluous address range check, Philippe Mathieu-Daudé, 2020/10/12
- [PATCH 3/6] hw/pci-host/sabre: Simplify code initializing variable once, Philippe Mathieu-Daudé, 2020/10/12
- [PATCH 4/6] hw/pci-host/sabre: Report unimplemented accesses via UNIMP log_mask, Philippe Mathieu-Daudé, 2020/10/12
- [PATCH 5/6] hw/pci-host/sabre: Report IOMMU address range as unimplemented, Philippe Mathieu-Daudé, 2020/10/12
- [PATCH 6/6] hw/pci-host/sabre: Log reserved address accesses as GUEST_ERROR,
Philippe Mathieu-Daudé <=
- Re: [PATCH 0/6] hw/pci-host/sabre: Report UNIMP/GUEST_ERROR accesses, Mark Cave-Ayland, 2020/10/19