[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 1/9] acpi: accept byte and word access to core ACPI registers
From: |
Michael S. Tsirkin |
Subject: |
[PULL 1/9] acpi: accept byte and word access to core ACPI registers |
Date: |
Wed, 22 Jul 2020 08:09:08 -0400 |
From: Michael Tokarev <mjt@tls.msk.ru>
All ISA registers should be accessible as bytes, words or dwords
(if wide enough). Fix the access constraints for acpi-pm-evt,
acpi-pm-tmr & acpi-cnt registers.
Fixes: 5d971f9e67 (memory: Revert "memory: accept mismatching sizes in
memory_region_access_valid")
Fixes: afafe4bbe0 (apci: switch cnt to memory api)
Fixes: 77d58b1e47 (apci: switch timer to memory api)
Fixes: b5a7c024d2 (apci: switch evt to memory api)
Buglink:
https://lore.kernel.org/xen-devel/20200630170913.123646-1-anthony.perard@citrix.com/T/
Buglink: https://bugs.debian.org/964793
BugLink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964247
BugLink: https://bugs.launchpad.net/bugs/1886318
Reported-By: Simon John <git@the-jedi.co.uk>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Message-Id: <20200720160627.15491-1-mjt@msgid.tls.msk.ru>
Cc: qemu-stable@nongnu.org
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/acpi/core.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/hw/acpi/core.c b/hw/acpi/core.c
index f6d9ec4f13..ac06db3450 100644
--- a/hw/acpi/core.c
+++ b/hw/acpi/core.c
@@ -458,7 +458,8 @@ static void acpi_pm_evt_write(void *opaque, hwaddr addr,
uint64_t val,
static const MemoryRegionOps acpi_pm_evt_ops = {
.read = acpi_pm_evt_read,
.write = acpi_pm_evt_write,
- .valid.min_access_size = 2,
+ .impl.min_access_size = 2,
+ .valid.min_access_size = 1,
.valid.max_access_size = 2,
.endianness = DEVICE_LITTLE_ENDIAN,
};
@@ -527,7 +528,8 @@ 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,
+ .valid.min_access_size = 1,
.valid.max_access_size = 4,
.endianness = DEVICE_LITTLE_ENDIAN,
};
@@ -599,7 +601,8 @@ static void acpi_pm_cnt_write(void *opaque, hwaddr addr,
uint64_t val,
static const MemoryRegionOps acpi_pm_cnt_ops = {
.read = acpi_pm_cnt_read,
.write = acpi_pm_cnt_write,
- .valid.min_access_size = 2,
+ .impl.min_access_size = 2,
+ .valid.min_access_size = 1,
.valid.max_access_size = 2,
.endianness = DEVICE_LITTLE_ENDIAN,
};
--
MST
- [PULL 0/9] acpi,virtio,pc: bugfixes, Michael S. Tsirkin, 2020/07/22
- [PULL 1/9] acpi: accept byte and word access to core ACPI registers,
Michael S. Tsirkin <=
- [PULL 2/9] virtio: Drop broken and superfluous object_property_set_link(), Michael S. Tsirkin, 2020/07/22
- [PULL 3/9] virtio-balloon: Prevent guest from starting a report when we didn't request one, Michael S. Tsirkin, 2020/07/22
- [PULL 4/9] virtio-balloon: Add locking to prevent possible race when starting hinting, Michael S. Tsirkin, 2020/07/22
- [PULL 5/9] virtio-balloon: Replace free page hinting references to 'report' with 'hint', Michael S. Tsirkin, 2020/07/22
- [PULL 6/9] virtio: list legacy-capable devices, Michael S. Tsirkin, 2020/07/22
- [PULL 7/9] virtio: verify that legacy support is not accidentally on, Michael S. Tsirkin, 2020/07/22
- [PULL 8/9] intel_iommu: Use correct shift for 256 bits qi descriptor, Michael S. Tsirkin, 2020/07/22
- [PULL 9/9] virtio-pci: Changed vdev to proxy for VirtIO PCI BAR callbacks., Michael S. Tsirkin, 2020/07/22
- Re: [PULL 0/9] acpi,virtio,pc: bugfixes, Peter Maydell, 2020/07/23