[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 06/24] vfio-user: Define type vfio_user_pci_dev_info
From: |
John Johnson |
Subject: |
Re: [PATCH v1 06/24] vfio-user: Define type vfio_user_pci_dev_info |
Date: |
Mon, 12 Dec 2022 20:44:23 +0000 |
> On Dec 12, 2022, at 3:46 AM, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> On 12/12/22 12:03, John Levon wrote:
>> On Mon, Dec 12, 2022 at 10:01:33AM +0100, Cédric Le Goater wrote:
>>>> diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
>>>> index 80b03a2..dc19869 100644
>>>> --- a/hw/vfio/pci.c
>>>> +++ b/hw/vfio/pci.c
>>>> @@ -19,6 +19,7 @@
>>>> */
>>>> #include "qemu/osdep.h"
>>>> +#include CONFIG_DEVICES
>>>> #include <linux/vfio.h>
>>>> #include <sys/ioctl.h>
>>>> @@ -3421,3 +3422,91 @@ static void register_vfio_pci_dev_type(void)
>>>> }
>>>> type_init(register_vfio_pci_dev_type)
>>>> +
>>>> +
>>>> +#ifdef CONFIG_VFIO_USER_PCI
>>>
>>> Why not introduce a new file hw/vfio/user.c file ? It would be
>>> cleaner.
>> user.c is in this series, and holds the vfio-user implementation - it's not a
>> PCI specific thing. So it would have to be hw/vfio/user_pci.c or something
>
> Or hw/vfio/pci-user.c
The vfio_user_* routines use a lot of hw/vfio/pci.c routines, so we’d
need to make a lot of those routines non-static if we made a new file.
JJ