diff mbox

[3/3] memory: Return -1 again on reads from unsigned regions

Message ID 1373988662-19211-4-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini July 16, 2013, 3:31 p.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

This restore the behavior prior to b018ddf633 which accidentally changed
the return code to 0. Specifically guests probing for register existence
were affected by this.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andreas Färber July 29, 2013, 2:59 p.m. UTC | #1
Am 16.07.2013 17:31, schrieb Paolo Bonzini:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> This restore the behavior prior to b018ddf633 which accidentally changed
> the return code to 0. Specifically guests probing for register existence
> were affected by this.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Unfortunately this negatively affects PReP: OpenHack'Ware booting Debian
Etch prints:

ERROR: WIN_READ_NATIVE_MAX : status 50 != 0x40

It does continue if one is patient enough.
No problems before this commit.

Any ideas, except that OHW may be doing Bad Things?

Andreas

> ---
>  memory.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/memory.c b/memory.c
> index 9938b6b..34a088e 100644
> --- a/memory.c
> +++ b/memory.c
> @@ -840,7 +840,7 @@ static uint64_t unassigned_mem_read(void *opaque, hwaddr addr,
>      if (current_cpu != NULL) {
>          cpu_unassigned_access(current_cpu, addr, false, false, 0, size);
>      }
> -    return 0;
> +    return -1ULL;
>  }
>  
>  static void unassigned_mem_write(void *opaque, hwaddr addr,
>
Jan Kiszka July 29, 2013, 3:01 p.m. UTC | #2
On 2013-07-29 16:59, Andreas Färber wrote:
> Am 16.07.2013 17:31, schrieb Paolo Bonzini:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> This restore the behavior prior to b018ddf633 which accidentally changed
>> the return code to 0. Specifically guests probing for register existence
>> were affected by this.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> Unfortunately this negatively affects PReP: OpenHack'Ware booting Debian
> Etch prints:
> 
> ERROR: WIN_READ_NATIVE_MAX : status 50 != 0x40
> 
> It does continue if one is patient enough.
> No problems before this commit.
> 
> Any ideas, except that OHW may be doing Bad Things?

Which accesses return different results now, PIO or MMIO? What did they
return prior to b018ddf633?

Jan
Andreas Färber July 29, 2013, 3:04 p.m. UTC | #3
Am 29.07.2013 17:01, schrieb Jan Kiszka:
> On 2013-07-29 16:59, Andreas Färber wrote:
>> Am 16.07.2013 17:31, schrieb Paolo Bonzini:
>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>> This restore the behavior prior to b018ddf633 which accidentally changed
>>> the return code to 0. Specifically guests probing for register existence
>>> were affected by this.
>>>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>
>> Unfortunately this negatively affects PReP: OpenHack'Ware booting Debian
>> Etch prints:
>>
>> ERROR: WIN_READ_NATIVE_MAX : status 50 != 0x40
>>
>> It does continue if one is patient enough.
>> No problems before this commit.
>>
>> Any ideas, except that OHW may be doing Bad Things?
> 
> Which accesses return different results now, PIO or MMIO? What did they
> return prior to b018ddf633?

Would I have to locally apply Paolo's MMIO tracing patches to find out?
My guess is as good as yours otherwise... ;)

Andreas
diff mbox

Patch

diff --git a/memory.c b/memory.c
index 9938b6b..34a088e 100644
--- a/memory.c
+++ b/memory.c
@@ -840,7 +840,7 @@  static uint64_t unassigned_mem_read(void *opaque, hwaddr addr,
     if (current_cpu != NULL) {
         cpu_unassigned_access(current_cpu, addr, false, false, 0, size);
     }
-    return 0;
+    return -1ULL;
 }
 
 static void unassigned_mem_write(void *opaque, hwaddr addr,