From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, qemu-devel@nongnu.org
Cc: jusual@redhat.com
Subject: Re: [PATCH] msix: allow qword MSI-X table accesses
Date: Thu, 14 May 2020 20:42:39 +0200 [thread overview]
Message-ID: <3e68c7aa-93a9-ec68-5128-7f2b7461dec6@redhat.com> (raw)
In-Reply-To: <20200514151648.877882-1-mst@redhat.com>
On 5/14/20 5:16 PM, Michael S. Tsirkin wrote:
> PCI spec says:
>
> For all accesses to MSI-X Table and MSI-X PBA fields, software must use
> aligned full DWORD or aligned full QWORD transactions; otherwise, the
> result is undefined.
>
> However, since MSI-X was converted to use memory API, QEMU
> started blocking qword transactions, only allowing DWORD
> ones. Guests do not seem to use QWORD accesses, but let's
> be spec compliant.
>
> Fixes: 95524ae8dc8f ("msix: convert to memory API")
9 years =)
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> hw/pci/msix.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/hw/pci/msix.c b/hw/pci/msix.c
> index 29187898f2..e6a5559038 100644
> --- a/hw/pci/msix.c
> +++ b/hw/pci/msix.c
> @@ -199,6 +199,9 @@ static const MemoryRegionOps msix_table_mmio_ops = {
> .endianness = DEVICE_LITTLE_ENDIAN,
> .valid = {
> .min_access_size = 4,
> + .max_access_size = 8,
> + },
> + .impl = {
> .max_access_size = 4,
> },
> };
> @@ -227,6 +230,9 @@ static const MemoryRegionOps msix_pba_mmio_ops = {
> .endianness = DEVICE_LITTLE_ENDIAN,
> .valid = {
> .min_access_size = 4,
> + .max_access_size = 8,
> + },
> + .impl = {
> .max_access_size = 4,
> },
> };
>
prev parent reply other threads:[~2020-05-14 18:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-14 15:16 [PATCH] msix: allow qword MSI-X table accesses Michael S. Tsirkin
2020-05-14 18:42 ` Philippe Mathieu-Daudé [this message]
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=3e68c7aa-93a9-ec68-5128-7f2b7461dec6@redhat.com \
--to=philmd@redhat.com \
--cc=jusual@redhat.com \
--cc=mst@redhat.com \
--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).