qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/core/register: Log unimplemented access via the 'unimp' debug level
@ 2018-06-22 12:47 Philippe Mathieu-Daudé
  2018-06-22 19:49 ` Alistair Francis
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-06-22 12:47 UTC (permalink / raw)
  To: Peter Maydell, Alistair Francis
  Cc: Philippe Mathieu-Daudé, qemu-devel, qemu-trivial

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/core/register.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/core/register.c b/hw/core/register.c
index d2d1636250..8ed7c6b927 100644
--- a/hw/core/register.c
+++ b/hw/core/register.c
@@ -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;
     }
-- 
2.18.0.rc2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/core/register: Log unimplemented access via the 'unimp' debug level
  2018-06-22 12:47 [Qemu-devel] [PATCH] hw/core/register: Log unimplemented access via the 'unimp' debug level Philippe Mathieu-Daudé
@ 2018-06-22 19:49 ` Alistair Francis
  2018-06-22 20:17   ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 3+ messages in thread
From: Alistair Francis @ 2018-06-22 19:49 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Alistair Francis, QEMU Trivial,
	qemu-devel@nongnu.org Developers

On Fri, Jun 22, 2018 at 5:47 AM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/core/register.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/core/register.c b/hw/core/register.c
> index d2d1636250..8ed7c6b927 100644
> --- a/hw/core/register.c
> +++ b/hw/core/register.c
> @@ -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);

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

>          return 0;
>      }
> --
> 2.18.0.rc2
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/core/register: Log unimplemented access via the 'unimp' debug level
  2018-06-22 19:49 ` Alistair Francis
@ 2018-06-22 20:17   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-06-22 20:17 UTC (permalink / raw)
  To: Alistair Francis
  Cc: Peter Maydell, Alistair Francis, QEMU Trivial,
	qemu-devel@nongnu.org Developers

On 06/22/2018 04:49 PM, Alistair Francis wrote:
> On Fri, Jun 22, 2018 at 5:47 AM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>>  hw/core/register.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/core/register.c b/hw/core/register.c
>> index d2d1636250..8ed7c6b927 100644
>> --- a/hw/core/register.c
>> +++ b/hw/core/register.c
>> @@ -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);
> 
> 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.

> 
> Alistair
> 
>>          return 0;
>>      }
>> --
>> 2.18.0.rc2
>>
>>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-22 20:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-22 12:47 [Qemu-devel] [PATCH] hw/core/register: Log unimplemented access via the 'unimp' debug level Philippe Mathieu-Daudé
2018-06-22 19:49 ` Alistair Francis
2018-06-22 20:17   ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).