qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-stable] [PATCH for-2.0] pc: ACPI BIOS: fix incorrect integer e


From: Michael S. Tsirkin
Subject: Re: [Qemu-stable] [PATCH for-2.0] pc: ACPI BIOS: fix incorrect integer encoding for 0x{F-1}FFFF values
Date: Mon, 14 Apr 2014 15:02:58 +0300

On Sun, Apr 13, 2014 at 11:55:51PM +0200, Igor Mammedov wrote:
> Fix typo in build_append_int() which causes integer
> truncation when it's in range 0x{F-1}FFFF by packing it
> as WordConst instead of required DWordConst.
> 
> Signed-off-by: Igor Mammedov <address@hidden>

Good catch - this fixes hotplug in slots 16,17,18 and 19.

I didn't notice this but we had:

                If (And (Arg0, 0x0000))
                {
                    Notify (S80, Arg1)
                }

                If (And (Arg0, 0x0000))
                {
                    Notify (S88, Arg1)
                }

                If (And (Arg0, 0x0000))
                {
                    Notify (S90, Arg1)
                }

                If (And (Arg0, 0x0000))
                {
                    Notify (S98, Arg1)
                }

Reviewed-by: Michael S. Tsirkin <address@hidden>

> ---
>  hw/i386/acpi-build.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 748e866..c3321b5 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -474,7 +474,7 @@ static void build_append_int(GArray *table, uint32_t 
> value)
>          build_append_byte(table, 0x01); /* OneOp */
>      } else if (value <= 0xFF) {
>          build_append_value(table, value, 1);
> -    } else if (value <= 0xFFFFF) {
> +    } else if (value <= 0xFFFF) {
>          build_append_value(table, value, 2);
>      } else {
>          build_append_value(table, value, 4);
> -- 
> 1.9.0



reply via email to

[Prev in Thread] Current Thread [Next in Thread]