From: Thomas Huth <thuth@redhat.com>
To: Farhan Ali <alifm@linux.ibm.com>, qemu-devel@nongnu.org
Cc: alex.williamson@redhat.com, stefanha@redhat.com,
mjrosato@linux.ibm.com, schnelle@linux.ibm.com,
philmd@linaro.org, kwolf@redhat.com, hreitz@redhat.com,
fam@euphon.net
Subject: Re: [PATCH v6 2/3] include: Add a header to define host PCI MMIO functions
Date: Mon, 5 May 2025 11:38:26 +0200 [thread overview]
Message-ID: <0e1bcc40-7429-4aec-8632-31cd49f9d333@redhat.com> (raw)
In-Reply-To: <20250430185012.2303-3-alifm@linux.ibm.com>
On 30/04/2025 20.50, Farhan Ali wrote:
> Add a generic API for host PCI MMIO reads/writes
> (e.g. Linux VFIO BAR accesses). The functions access
> little endian memory and returns the result in
> host cpu endianness.
>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Farhan Ali <alifm@linux.ibm.com>
> ---
...
> +static inline uint8_t host_pci_ldub_p(const void *ioaddr)
> +{
> + uint8_t ret = 0;
> +#ifdef __s390x__
> + ret = s390x_pci_mmio_read_8(ioaddr);
> +#else
> + ret = ldub_p(ioaddr);
> +#endif
> +
> + return ret;
> +}
...
> +static inline void host_pci_stb_le_p(void *ioaddr, uint8_t val)
> +{
> +#ifdef __s390x__
> + s390x_pci_mmio_write_8(ioaddr, val);
> +#else
> + stb_p(ioaddr, val);
> +#endif
> +}
Cosmetic nit: host_pci_ldub_p() does not have a "_le_" in its name, while
host_pci_stb_le_p() has it. Could be fixed up while picking up the patch, so
no need to respin just because of this.
Reviewed-by: Thomas Huth <thuth@redhat.com>
next prev parent reply other threads:[~2025-05-05 9:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-30 18:50 [PATCH v6 0/3] Enable QEMU NVMe userspace driver on s390x Farhan Ali
2025-04-30 18:50 ` [PATCH v6 1/3] util: Add functions for s390x mmio read/write Farhan Ali
2025-05-07 18:09 ` Thomas Huth
2025-04-30 18:50 ` [PATCH v6 2/3] include: Add a header to define host PCI MMIO functions Farhan Ali
2025-05-05 9:38 ` Thomas Huth [this message]
2025-05-07 16:15 ` Farhan Ali
2025-05-07 17:45 ` Stefan Hajnoczi
2025-04-30 18:50 ` [PATCH v6 3/3] block/nvme: Use host PCI MMIO API Farhan Ali
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=0e1bcc40-7429-4aec-8632-31cd49f9d333@redhat.com \
--to=thuth@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=alifm@linux.ibm.com \
--cc=fam@euphon.net \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mjrosato@linux.ibm.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=schnelle@linux.ibm.com \
--cc=stefanha@redhat.com \
/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).