[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220228132346.77624e5b.alex.williamson@redhat.com>
Date: Mon, 28 Feb 2022 13:23:46 -0700
From: Alex Williamson <alex.williamson@...hat.com>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: Shameer Kolothum <shameerali.kolothum.thodi@...wei.com>,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-crypto@...r.kernel.org, jgg@...dia.com, cohuck@...hat.com,
mgurtovoy@...dia.com, yishaih@...dia.com, linuxarm@...wei.com,
liulongfang@...wei.com, prime.zeng@...ilicon.com,
jonathan.cameron@...wei.com, wangzhou1@...ilicon.com,
bhelgaas@...gle.com, linux-pci@...r.kernel.org
Subject: Re: [PATCH v6 03/10] hisi_acc_qm: Move PCI device IDs to common
header
On Mon, 28 Feb 2022 14:12:59 -0600
Bjorn Helgaas <helgaas@...nel.org> wrote:
> On Mon, Feb 28, 2022 at 10:33:38AM -0700, Alex Williamson wrote:
> > [Cc+ Bjorn, linux-pci]
> >
> > On Mon, 28 Feb 2022 09:01:14 +0000
> > Shameer Kolothum <shameerali.kolothum.thodi@...wei.com> wrote:
> >
> > > Move the PCI Device IDs of HiSilicon ACC devices to
> > > a common header and use a uniform naming convention.
>
> > > --- a/include/linux/pci_ids.h
> > > +++ b/include/linux/pci_ids.h
> > > @@ -2529,6 +2529,12 @@
> > > #define PCI_DEVICE_ID_KORENIX_JETCARDF3 0x17ff
> > >
> > > #define PCI_VENDOR_ID_HUAWEI 0x19e5
> > > +#define PCI_DEVICE_ID_HUAWEI_ZIP_PF 0xa250
> > > +#define PCI_DEVICE_ID_HUAWEI_ZIP_VF 0xa251
> > > +#define PCI_DEVICE_ID_HUAWEI_SEC_PF 0xa255
> > > +#define PCI_DEVICE_ID_HUAWEI_SEC_VF 0xa256
> > > +#define PCI_DEVICE_ID_HUAWEI_HPRE_PF 0xa258
> > > +#define PCI_DEVICE_ID_HUAWEI_HPRE_VF 0xa259
>
> We usually don't add things to pci_ids.h unless they're used in more
> than one place (see the comment at the top of the file). AFAICT,
> these device IDs are only used in one file, so you can leave the
> #defines in the file that uses them or use bare hex values.
Later in this series the VF IDs are added to a vendor variant of the
vfio-pci driver:
https://lore.kernel.org/all/20220228090121.1903-5-shameerali.kolothum.thodi@huawei.com/
diff --git a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
new file mode 100644
index 000000000000..8129c3457b3b
--- /dev/null
+++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
...
+static const struct pci_device_id hisi_acc_vfio_pci_table[] = {
+ { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_HUAWEI, PCI_DEVICE_ID_HUAWEI_SEC_VF) },
+ { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_HUAWEI, PCI_DEVICE_ID_HUAWEI_HPRE_VF) },
+ { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_HUAWEI, PCI_DEVICE_ID_HUAWEI_ZIP_VF) },
+ { }
+};
So I think the VFs IDs meet the requirements, but perhaps not the PF
IDs. Would it be ok if the PFs were dropped? Thanks,
Alex
Powered by blists - more mailing lists