qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Allow acpi-tmr size=2
@ 2020-07-12 12:00 Simon John
  2020-07-13  7:20 ` Michael Tokarev
  0 siblings, 1 reply; 13+ messages in thread
From: Simon John @ 2020-07-12 12:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: imammedo, mst

macos guests no longer boot after commit 
5d971f9e672507210e77d020d89e0e89165c8fc9

acpi-tmr needs 2 byte memory accesses, so breaks as that commit only 
allows 4 bytes.

Fixes: 5d971f9e672507210e7 (memory: Revert "memory: accept mismatching 
sizes in memory_region_access_valid")
Buglink: https://bugs.launchpad.net/qemu/+bug/1886318

Signed-off-by: Simon John <git@the-jedi.co.uk>
---
  hw/acpi/core.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/acpi/core.c b/hw/acpi/core.c
index f6d9ec4f13..05ff29b9d7 100644
--- a/hw/acpi/core.c
+++ b/hw/acpi/core.c
@@ -527,7 +527,7 @@ 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,
+    .valid.min_access_size = 1,
      .valid.max_access_size = 4,
      .endianness = DEVICE_LITTLE_ENDIAN,
  };
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 13+ messages in thread
* Re: [PATCH] Allow acpi-tmr size=2
@ 2020-07-13 13:50 Simon John
  0 siblings, 0 replies; 13+ messages in thread
From: Simon John @ 2020-07-13 13:50 UTC (permalink / raw)
  To: qemu-devel

On Mon, 13 Jul 2020 08:17:41 -0400, Michael S. Tsirkin wrote:

> Sounds good. And how about also adding:
> 
>       .impl.min_access_size = 4,
> 
> ?

Yes, this works too - what does that do?

static const MemoryRegionOps acpi_pm_tmr_ops = {
     .read = acpi_pm_tmr_read,
     .write = acpi_pm_tmr_write,
     .valid.min_access_size = 2,
     .valid.max_access_size = 4,
     .impl.min_access_size = 4,
     .impl.max_access_size = 4,
     .endianness = DEVICE_LITTLE_ENDIAN,
};

Regards.

-- 
Simon John


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

end of thread, other threads:[~2020-07-14 11:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-12 12:00 [PATCH] Allow acpi-tmr size=2 Simon John
2020-07-13  7:20 ` Michael Tokarev
2020-07-13  7:43   ` Michael Tokarev
2020-07-13 11:01     ` Michael S. Tsirkin
2020-07-13 11:14   ` Michael S. Tsirkin
2020-07-13 11:46     ` Simon John
2020-07-13 12:17       ` Michael S. Tsirkin
2020-07-13 14:16         ` Michael Tokarev
2020-07-14  7:55           ` Michael S. Tsirkin
2020-07-14 10:55     ` Philippe Mathieu-Daudé
2020-07-14 11:12       ` Michael S. Tsirkin
2020-07-14  9:29   ` Michael S. Tsirkin
  -- strict thread matches above, loose matches on Subject: below --
2020-07-13 13:50 Simon John

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).