qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH for-5.1] acpi-pm-tmr: allow 2-byte reads


From: Michael S. Tsirkin
Subject: Re: [PATCH for-5.1] acpi-pm-tmr: allow 2-byte reads
Date: Tue, 14 Jul 2020 06:06:11 -0400

On Tue, Jul 14, 2020 at 12:55:18PM +0300, Michael Tokarev wrote:
> As found in LP#964247, MacOS Catalina performs 2-byte reads
> on the acpi timer address space while the spec says it should
> be 4-byte. Allow 2-byte reads.
> 
> Reported-By: Simon John <git@the-jedi.co.uk>
> Signed-Off-By: Michael Tokarev <mjt@tls.msk.ru>

After some thought, I think I'll do a 1-byte one the way
Simon proposed. Just go back to behave the way it did.
Will apply yours on top - Simon - could you try and send a
tested-by tag please?


> ---
>  hw/acpi/core.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> I'm applying this to debian qemu package, need the fix
> faster in order to release security updates for other
> branches.
> 
> diff --git a/hw/acpi/core.c b/hw/acpi/core.c
> index 45cbed49ab..9be38aa2ac 100644
> --- a/hw/acpi/core.c
> +++ b/hw/acpi/core.c
> @@ -530,7 +530,9 @@ static void acpi_pm_tmr_write(void *opaque, hwaddr addr, 
> uint64_t val,
>  static const MemoryRegionOps acpi_pm_tmr_ops = {
>      .read = acpi_pm_tmr_read,
>      .write = acpi_pm_tmr_write,
> -    .valid.min_access_size = 4,
> +    .impl.min_access_size = 4,
> +     /* at least MacOS Catalina reads 2 bytes and fails if it doesn't work */
> +    .valid.min_access_size = 2,
>      .valid.max_access_size = 4,
>      .endianness = DEVICE_LITTLE_ENDIAN,
>  };
> -- 
> 2.20.1




reply via email to

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