[PATCH v3 2/4] bus/pci: avoid depending on private value in kernel source

Cao, Yahui yahui.cao at intel.com
Mon May 29 08:30:34 CEST 2023


On 5/26/2023 12:31 AM, Miao Li wrote:
> From: Chenbo Xia <chenbo.xia at intel.com>
>
> The value 40 used in VFIO_GET_REGION_ADDR() is a private value
> (VFIO_PCI_OFFSET_SHIFT) defined in Linux kernel source [1]. It
> is not part of VFIO API, and we should not depend on it.
>
> [1] https://github.com/torvalds/linux/blob/v6.2/include/linux/vfio_pci_core.h
>
> Signed-off-by: Chenbo Xia <chenbo.xia at intel.com>
> ---
>   drivers/bus/pci/linux/pci.c      |   4 +-
>   drivers/bus/pci/linux/pci_init.h |   4 +-
>   drivers/bus/pci/linux/pci_vfio.c | 197 +++++++++++++++++++++++--------
>   drivers/bus/pci/private.h        |   9 ++
>   lib/eal/include/rte_vfio.h       |   1 -
>   5 files changed, 159 insertions(+), 56 deletions(-)
>
Acked-by: Yahui Cao <yahui.cao at intel.com>


More information about the dev mailing list