Re: [PATCH v4 2/3] include: Add a header to define host PCI MMIO functions

2025-04-15 Thread Farhan Ali
On 4/14/2025 11:43 PM, Philippe Mathieu-Daudé wrote: Hi, On 14/4/25 23:36, 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. Signed-off-by: Farhan Ali --

Re: [PATCH v4 2/3] include: Add a header to define host PCI MMIO functions

2025-04-15 Thread Richard Henderson
On 4/14/25 23:43, Philippe Mathieu-Daudé wrote: +static inline uint8_t host_pci_ldub_p(const void *ioaddr) Is it really worth inlining? +{ +    uint8_t ret = 0; +#ifdef __s390x__ +    ret = s390x_pci_mmio_read_8(ioaddr); +#else +    ret = ldub_he_p(ioaddr); +#endif Since the non-s390x path

Re: [PATCH v4 2/3] include: Add a header to define host PCI MMIO functions

2025-04-14 Thread Philippe Mathieu-Daudé
Hi, On 14/4/25 23:36, 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. Signed-off-by: Farhan Ali --- include/qemu/host-pci-mmio.h | 141 +

Re: [PATCH v4 2/3] include: Add a header to define host PCI MMIO functions

2025-04-14 Thread Farhan Ali
On 4/14/2025 2:36 PM, 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. Signed-off-by: Farhan Ali --- include/qemu/host-pci-mmio.h | 141

[PATCH v4 2/3] include: Add a header to define host PCI MMIO functions

2025-04-14 Thread Farhan Ali
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. Signed-off-by: Farhan Ali --- include/qemu/host-pci-mmio.h | 141 +++ 1 file changed, 141 inse