From: "Michael S. Tsirkin" <mst@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Simon John <git@the-jedi.co.uk>, qemu-devel@nongnu.org
Subject: Re: [PATCH for-5.1] acpi: accept byte and word access to core ACPI registers
Date: Wed, 22 Jul 2020 07:24:23 -0400 [thread overview]
Message-ID: <20200722072414-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20200720160627.15491-1-mjt@msgid.tls.msk.ru>
On Mon, Jul 20, 2020 at 07:06:27PM +0300, Michael Tokarev wrote:
> 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>
Queued, thanks!
> ---
> 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,
> };
> --
> 2.20.1
next prev parent reply other threads:[~2020-07-22 11:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-20 16:06 [PATCH for-5.1] acpi: accept byte and word access to core ACPI registers Michael Tokarev
2020-07-22 11:24 ` Michael S. Tsirkin [this message]
2020-07-22 12:00 ` Michael Tokarev
2020-07-22 12:02 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200722072414-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=git@the-jedi.co.uk \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).