hw/core/register: Log unimplemented access via the 'unimp' debug level
PATCH 1/1 hw/core/register: Log unimplemented access via the 'unimp' debug level
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
--- hw/core/register.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/core/register.c +2 -2
@@ -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
Quoted 19 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/core/register.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/core/register.c +1
-1@@ -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
-1return 0 ; } --2.18.0.rc2
Quoted 22 lines · Alistair Francis
Quoted 21 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/core/register.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/core/register.c +1
-1@@ -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
-1if (!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
-1return 0 ; } --2.18.0.rc2