From: Bjorn Helgaas <helgaas@kernel.org>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-crypto@vger.kernel.org, jgg@nvidia.com, cohuck@redhat.com,
mgurtovoy@nvidia.com, yishaih@nvidia.com, linuxarm@huawei.com,
liulongfang@huawei.com, prime.zeng@hisilicon.com,
jonathan.cameron@huawei.com, wangzhou1@hisilicon.com,
bhelgaas@google.com, linux-pci@vger.kernel.org
Subject: Re: [PATCH v6 03/10] hisi_acc_qm: Move PCI device IDs to common header
Date: Mon, 28 Feb 2022 14:55:37 -0600 [thread overview]
Message-ID: <20220228205537.GA520961@bhelgaas> (raw)
In-Reply-To: <20220228132346.77624e5b.alex.williamson@redhat.com>
On Mon, Feb 28, 2022 at 01:23:46PM -0700, Alex Williamson wrote:
> On Mon, 28 Feb 2022 14:12:59 -0600
> Bjorn Helgaas <helgaas@kernel.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@huawei.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,
Sure :)
Bjorn
next prev parent reply other threads:[~2022-02-28 20:55 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-28 9:01 [PATCH v6 00/10] vfio/hisilicon: add ACC live migration driver Shameer Kolothum
2022-02-28 9:01 ` [PATCH v6 01/10] crypto: hisilicon/qm: Move the QM header to include/linux Shameer Kolothum
2022-02-28 9:01 ` [PATCH v6 02/10] crypto: hisilicon/qm: Move few definitions to common header Shameer Kolothum
2022-02-28 9:01 ` [PATCH v6 03/10] hisi_acc_qm: Move PCI device IDs " Shameer Kolothum
2022-02-28 17:33 ` Alex Williamson
2022-02-28 20:12 ` Bjorn Helgaas
2022-02-28 20:23 ` Alex Williamson
2022-02-28 20:55 ` Bjorn Helgaas [this message]
2022-02-28 9:01 ` [PATCH v6 04/10] hisi_acc_vfio_pci: add new vfio_pci driver for HiSilicon ACC devices Shameer Kolothum
2022-02-28 9:01 ` [PATCH v6 05/10] hisi_acc_vfio_pci: Restrict access to VF dev BAR2 migration region Shameer Kolothum
2022-02-28 9:01 ` [PATCH v6 06/10] hisi_acc_vfio_pci: Add helper to retrieve the struct pci_driver Shameer Kolothum
2022-02-28 9:01 ` [PATCH v6 07/10] vfio: Extend the device migration protocol with PRE_COPY Shameer Kolothum
2022-02-28 9:01 ` [PATCH v6 08/10] crypto: hisilicon/qm: Set the VF QM state register Shameer Kolothum
2022-02-28 9:01 ` [PATCH v6 09/10] hisi_acc_vfio_pci: Add support for VFIO live migration Shameer Kolothum
2022-02-28 14:57 ` Jason Gunthorpe
2022-02-28 18:01 ` Shameerali Kolothum Thodi
2022-02-28 18:05 ` Jason Gunthorpe
2022-02-28 20:16 ` Alex Williamson
2022-02-28 20:29 ` Jason Gunthorpe
2022-02-28 21:20 ` Alex Williamson
2022-02-28 23:47 ` Jason Gunthorpe
2022-03-01 4:41 ` Alex Williamson
2022-03-01 13:15 ` Jason Gunthorpe
2022-03-01 19:30 ` Alex Williamson
2022-03-01 20:39 ` Jason Gunthorpe
2022-03-01 22:44 ` Alex Williamson
2022-03-02 0:03 ` Jason Gunthorpe
2022-03-02 9:07 ` Shameerali Kolothum Thodi
2022-02-28 9:01 ` [PATCH v6 10/10] hisi_acc_vfio_pci: Use its own PCI reset_done error handler Shameer Kolothum
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=20220228205537.GA520961@bhelgaas \
--to=helgaas@kernel.org \
--cc=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=cohuck@redhat.com \
--cc=jgg@nvidia.com \
--cc=jonathan.cameron@huawei.com \
--cc=kvm@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=liulongfang@huawei.com \
--cc=mgurtovoy@nvidia.com \
--cc=prime.zeng@hisilicon.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=wangzhou1@hisilicon.com \
--cc=yishaih@nvidia.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