Skip to contentSkip to conversation

hw/core/register: Log unimplemented access via the 'unimp' debug level

PATCH In review Philippe Mathieu-Daudé 2 participants 3 messages Jun 22, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/core/register: Log unimplemented access via the 'unimp' debug level

---
 hw/core/register.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/core/register.c +2 -2
index d2d1636250..8ed7c6b927 100644
@@ -203,7 +203,7 @@ void register_write_memory(void *opaque, hwaddr addr,
     }
 
     if (!reg) {
-        qemu_log_mask(LOG_GUEST_ERROR, "%s: write to unimplemented register " \
+        qemu_log_mask(LOG_UNIMP, "%s: write to unimplemented register " \
                       "at address: %#" PRIx64 "\n", reg_array->prefix, addr);
         return;
     }
@@ -232,7 +232,7 @@ uint64_t register_read_memory(void *opaque, hwaddr addr,
     }
 
     if (!reg) {
-        qemu_log_mask(LOG_GUEST_ERROR, "%s:  read to unimplemented register " \
+        qemu_log_mask(LOG_UNIMP, "%s:  read to unimplemented register " \
                       "at address: %#" PRIx64 "\n", reg_array->prefix, addr);
         return 0;
     }
Signature · 1 line
2.18.0.rc2
#1 lore raw
Quoted 19 lines · Philippe Mathieu-Daudé
---
 hw/core/register.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/core/register.c +1 -1
index d2d1636250..8ed7c6b927 100644
@@ -203,7 +203,7 @@ void register_write_memory(void *opaque, hwaddr addr,
     }
 
     if (!reg) {
-        qemu_log_mask(LOG_GUEST_ERROR, "%s: write to unimplemented register " \
+        qemu_log_mask(LOG_UNIMP, "%s: write to unimplemented register " \
                       "at address: %#" PRIx64 "\n", reg_array->prefix, addr);
         return;
     }

hw/core/register.c uint64_t register_read_memory(void *opaque, hwaddr addr, · line 236

Quoted 6 lines
hw/core/register.c +1 -1
@@ -232,7 +232,7 @@ uint64_t register_read_memory(void *opaque, hwaddr addr,
     }
 
     if (!reg) {
-        qemu_log_mask(LOG_GUEST_ERROR, "%s:  read to unimplemented register " \
+        qemu_log_mask(LOG_UNIMP, "%s:  read to unimplemented register " \
                       "at address: %#" PRIx64 "\n", reg_array->prefix, addr);

I'm not sure this is correct. These can be unimplemented because there are gaps in the register memory map, so it is a guest error.

Alistair

Quoted 6 lines
hw/core/register.c +0 -1
         return 0;
     }
--

2.18.0.rc2

#2 lore raw
Quoted 22 lines · Alistair Francis
Quoted 21 lines · Philippe Mathieu-Daudé
---
 hw/core/register.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/core/register.c +1 -1
index d2d1636250..8ed7c6b927 100644
@@ -203,7 +203,7 @@ void register_write_memory(void *opaque, hwaddr addr,
     }
 
     if (!reg) {
-        qemu_log_mask(LOG_GUEST_ERROR, "%s: write to unimplemented register " \
+        qemu_log_mask(LOG_UNIMP, "%s: write to unimplemented register " \
                       "at address: %#" PRIx64 "\n", reg_array->prefix, addr);
         return;
     }
@@ -232,7 +232,7 @@ uint64_t register_read_memory(void *opaque, hwaddr addr,
     }
 
Quoted 7 lines

hw/core/register.c uint64_t register_read_memory(void *opaque, hwaddr addr, · line 236

Quoted 4 lines
hw/core/register.c +1 -1
     if (!reg) {
-        qemu_log_mask(LOG_GUEST_ERROR, "%s:  read to unimplemented register " \
+        qemu_log_mask(LOG_UNIMP, "%s:  read to unimplemented register " \
                       "at address: %#" PRIx64 "\n", reg_array->prefix, addr);

I'm not sure this is correct. These can be unimplemented because there are gaps in the register memory map, so it is a guest error.

This is exactly what I was wondering, thanks for your comment, I'll probably add a comment about it.

Quoted 9 lines

Alistair

Quoted 6 lines
hw/core/register.c +0 -1
         return 0;
     }
--

2.18.0.rc2