qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 6/6] hw/pci-host/sabre: Log reserved address accesses as GUES


From: Mark Cave-Ayland
Subject: Re: [PATCH 6/6] hw/pci-host/sabre: Log reserved address accesses as GUEST_ERROR
Date: Mon, 19 Oct 2020 22:58:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1

On 12/10/2020 18:09, Philippe Mathieu-Daudé wrote:

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);

As per my comment on patch 4, I think these should be logged at LOG_UNIMP and the message changed to "is unimplemented". Other than that:

Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


ATB,

Mark.



reply via email to

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