diff mbox

memory: Return -1 again on reads from unsigned regions

Message ID 51E5405C.6080108@siemens.com
State New
Headers show

Commit Message

Jan Kiszka July 16, 2013, 12:45 p.m. UTC
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>
---
 memory.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Paolo Bonzini July 16, 2013, 12:47 p.m. UTC | #1
Il 16/07/2013 14:45, Jan Kiszka ha scritto:
> 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>
> ---
>  memory.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/memory.c b/memory.c
> index 757e9a5..d19b61b 100644
> --- a/memory.c
> +++ b/memory.c
> @@ -859,7 +859,7 @@ static uint64_t unassigned_mem_read(void *opaque, hwaddr addr,
>          cpu_unassigned_access(ENV_GET_CPU(cpu_single_env),
>                                addr, false, false, 0, size);
>      }
> -    return 0;
> +    return -1ULL;
>  }
>  
>  static void unassigned_mem_write(void *opaque, hwaddr addr,
> 

Applied, thanks.

Paolo
Stefan Hajnoczi July 17, 2013, 2 a.m. UTC | #2
On Tue, Jul 16, 2013 at 02:45:16PM +0200, Jan Kiszka wrote:
> 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>
> ---
>  memory.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/memory.c b/memory.c
> index 757e9a5..d19b61b 100644
> --- a/memory.c
> +++ b/memory.c
> @@ -859,7 +859,7 @@ static uint64_t unassigned_mem_read(void *opaque, hwaddr addr,
>          cpu_unassigned_access(ENV_GET_CPU(cpu_single_env),
>                                addr, false, false, 0, size);
>      }
> -    return 0;
> +    return -1ULL;
>  }
>  
>  static void unassigned_mem_write(void *opaque, hwaddr addr,

Fixes the IPMI timeout while booting RHEL 6.4 guests.

Tested-by: Stefan Hajnoczi <stefanha@redhat.com>
Peter Maydell Aug. 8, 2013, 3:13 p.m. UTC | #3
On 16 July 2013 13:45, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> 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>

For the record (I know you have a revert-patch on the list)
this patch breaks the 'musicpal' platform (my test image
no longer boots with this change).

-- PMM
Jan Kiszka Aug. 8, 2013, 3:31 p.m. UTC | #4
On 2013-08-08 17:13, Peter Maydell wrote:
> On 16 July 2013 13:45, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>> 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>
> 
> For the record (I know you have a revert-patch on the list)
> this patch breaks the 'musicpal' platform (my test image
> no longer boots with this change).

Yes, that's how I finally found out as well that this patch was wrong.

Jan
diff mbox

Patch

diff --git a/memory.c b/memory.c
index 757e9a5..d19b61b 100644
--- a/memory.c
+++ b/memory.c
@@ -859,7 +859,7 @@  static uint64_t unassigned_mem_read(void *opaque, hwaddr addr,
         cpu_unassigned_access(ENV_GET_CPU(cpu_single_env),
                               addr, false, false, 0, size);
     }
-    return 0;
+    return -1ULL;
 }
 
 static void unassigned_mem_write(void *opaque, hwaddr addr,