|
|
1072c8 |
From dcac680adb6b8624f14eda3e812521bddbe8ecea Mon Sep 17 00:00:00 2001
|
|
|
a6baaf |
From: Jon Maloy <jmaloy@redhat.com>
|
|
|
a6baaf |
Date: Wed, 21 Apr 2021 22:30:04 -0400
|
|
|
1072c8 |
Subject: [PATCH 5/7] acpi: accept byte and word access to core ACPI registers
|
|
|
a6baaf |
MIME-Version: 1.0
|
|
|
a6baaf |
Content-Type: text/plain; charset=UTF-8
|
|
|
a6baaf |
Content-Transfer-Encoding: 8bit
|
|
|
a6baaf |
|
|
|
a6baaf |
RH-Author: Jon Maloy <jmaloy@redhat.com>
|
|
|
a6baaf |
Message-id: <20210421223006.19650-5-jmaloy@redhat.com>
|
|
|
a6baaf |
Patchwork-id: 101482
|
|
|
a6baaf |
O-Subject: [RHEL-8.5.0 qemu-kvm PATCH v2 4/6] acpi: accept byte and word access to core ACPI registers
|
|
|
1072c8 |
Bugzilla: 1842478
|
|
|
a6baaf |
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
|
|
|
a6baaf |
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
a6baaf |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
a6baaf |
|
|
|
a6baaf |
From: Michael Tokarev <mjt@tls.msk.ru>
|
|
|
a6baaf |
|
|
|
a6baaf |
All ISA registers should be accessible as bytes, words or dwords
|
|
|
a6baaf |
(if wide enough). Fix the access constraints for acpi-pm-evt,
|
|
|
a6baaf |
acpi-pm-tmr & acpi-cnt registers.
|
|
|
a6baaf |
|
|
|
a6baaf |
Fixes: 5d971f9e67 (memory: Revert "memory: accept mismatching sizes in memory_region_access_valid")
|
|
|
a6baaf |
Fixes: afafe4bbe0 (apci: switch cnt to memory api)
|
|
|
a6baaf |
Fixes: 77d58b1e47 (apci: switch timer to memory api)
|
|
|
a6baaf |
Fixes: b5a7c024d2 (apci: switch evt to memory api)
|
|
|
a6baaf |
Buglink: https://lore.kernel.org/xen-devel/20200630170913.123646-1-anthony.perard@citrix.com/T/
|
|
|
a6baaf |
Buglink: https://bugs.debian.org/964793
|
|
|
a6baaf |
BugLink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247
|
|
|
a6baaf |
BugLink: https://bugs.launchpad.net/bugs/1886318
|
|
|
a6baaf |
Reported-By: Simon John <git@the-jedi.co.uk>
|
|
|
a6baaf |
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
|
|
|
a6baaf |
Message-Id: <20200720160627.15491-1-mjt@msgid.tls.msk.ru>
|
|
|
a6baaf |
Cc: qemu-stable@nongnu.org
|
|
|
a6baaf |
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
a6baaf |
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
a6baaf |
|
|
|
a6baaf |
(cherry picked from commit dba04c3488c4699f5afe96f66e448b1d447cf3fb)
|
|
|
a6baaf |
Signed-off-by: Jon Maloy <jmaloy@redhat.com>
|
|
|
a6baaf |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
a6baaf |
---
|
|
|
a6baaf |
hw/acpi/core.c | 9 ++++++---
|
|
|
a6baaf |
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
|
a6baaf |
|
|
|
a6baaf |
diff --git a/hw/acpi/core.c b/hw/acpi/core.c
|
|
|
a6baaf |
index 45cbed49ab..d85052c34a 100644
|
|
|
a6baaf |
--- a/hw/acpi/core.c
|
|
|
a6baaf |
+++ b/hw/acpi/core.c
|
|
|
a6baaf |
@@ -461,7 +461,8 @@ static void acpi_pm_evt_write(void *opaque, hwaddr addr, uint64_t val,
|
|
|
a6baaf |
static const MemoryRegionOps acpi_pm_evt_ops = {
|
|
|
a6baaf |
.read = acpi_pm_evt_read,
|
|
|
a6baaf |
.write = acpi_pm_evt_write,
|
|
|
a6baaf |
- .valid.min_access_size = 2,
|
|
|
a6baaf |
+ .impl.min_access_size = 2,
|
|
|
a6baaf |
+ .valid.min_access_size = 1,
|
|
|
a6baaf |
.valid.max_access_size = 2,
|
|
|
a6baaf |
.endianness = DEVICE_LITTLE_ENDIAN,
|
|
|
a6baaf |
};
|
|
|
a6baaf |
@@ -530,7 +531,8 @@ static void acpi_pm_tmr_write(void *opaque, hwaddr addr, uint64_t val,
|
|
|
a6baaf |
static const MemoryRegionOps acpi_pm_tmr_ops = {
|
|
|
a6baaf |
.read = acpi_pm_tmr_read,
|
|
|
a6baaf |
.write = acpi_pm_tmr_write,
|
|
|
a6baaf |
- .valid.min_access_size = 4,
|
|
|
a6baaf |
+ .impl.min_access_size = 4,
|
|
|
a6baaf |
+ .valid.min_access_size = 1,
|
|
|
a6baaf |
.valid.max_access_size = 4,
|
|
|
a6baaf |
.endianness = DEVICE_LITTLE_ENDIAN,
|
|
|
a6baaf |
};
|
|
|
a6baaf |
@@ -602,7 +604,8 @@ static void acpi_pm_cnt_write(void *opaque, hwaddr addr, uint64_t val,
|
|
|
a6baaf |
static const MemoryRegionOps acpi_pm_cnt_ops = {
|
|
|
a6baaf |
.read = acpi_pm_cnt_read,
|
|
|
a6baaf |
.write = acpi_pm_cnt_write,
|
|
|
a6baaf |
- .valid.min_access_size = 2,
|
|
|
a6baaf |
+ .impl.min_access_size = 2,
|
|
|
a6baaf |
+ .valid.min_access_size = 1,
|
|
|
a6baaf |
.valid.max_access_size = 2,
|
|
|
a6baaf |
.endianness = DEVICE_LITTLE_ENDIAN,
|
|
|
a6baaf |
};
|
|
|
a6baaf |
--
|
|
|
a6baaf |
2.27.0
|
|
|
a6baaf |
|