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

[qemu-xen staging-4.14] acpi: accept byte and word access to core ACPI registers



commit 974b857df6e9dd69c709b20159f07b09f3f6254e
Author:     Michael Tokarev <mjt@xxxxxxxxxx>
AuthorDate: Mon Jul 20 19:06:27 2020 +0300
Commit:     Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
CommitDate: Thu Aug 27 00:03:16 2020 -0500

    acpi: accept byte and word access to core ACPI registers
    
    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@xxxxxxxxxx/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@xxxxxxxxxxxxxx>
    Signed-off-by: Michael Tokarev <mjt@xxxxxxxxxx>
    Message-Id: <20200720160627.15491-1-mjt@xxxxxxxxxxxxxxxx>
    Cc: qemu-stable@xxxxxxxxxx
    Reviewed-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
    Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
    (cherry picked from commit dba04c3488c4699f5afe96f66e448b1d447cf3fb)
    Signed-off-by: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
---
 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 45cbed49ab..d85052c34a 100644
--- a/hw/acpi/core.c
+++ b/hw/acpi/core.c
@@ -461,7 +461,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,
 };
@@ -530,7 +531,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,
 };
@@ -602,7 +604,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,
 };
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#staging-4.14



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.