[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<PH0PR18MB44258399D99FBE01DEB6A479D9312@PH0PR18MB4425.namprd18.prod.outlook.com>
Date: Fri, 6 Dec 2024 07:25:35 +0000
From: Shijith Thotton <sthotton@...vell.com>
To: Jason Wang <jasowang@...hat.com>
CC: "virtualization@...ts.linux.dev" <virtualization@...ts.linux.dev>,
"mst@...hat.com" <mst@...hat.com>,
"dan.carpenter@...aro.org"
<dan.carpenter@...aro.org>,
Srujana Challa <schalla@...vell.com>,
Vamsi
Krishna Attunuru <vattunuru@...vell.com>,
Nithin Kumar Dabilpuram
<ndabilpuram@...vell.com>,
Jerin Jacob <jerinj@...vell.com>,
Xuan Zhuo
<xuanzhuo@...ux.alibaba.com>,
Eugenio PĂ©rez
<eperezma@...hat.com>,
Satha Koteswara Rao Kottidi <skoteshwar@...vell.com>,
open list <linux-kernel@...r.kernel.org>
Subject: RE: [EXTERNAL] Re: [PATCH v2 3/4] vdpa/octeon_ep: read
vendor-specific PCI capability
>> Added support to read the vendor-specific PCI capability to identify the
>> type of device being emulated.
>>
>> Signed-off-by: Shijith Thotton <sthotton@...vell.com>
>> ---
>> drivers/vdpa/octeon_ep/octep_vdpa.h | 24 +++++++++++++++++
>> drivers/vdpa/octeon_ep/octep_vdpa_hw.c | 34
>+++++++++++++++++++++++-
>> drivers/vdpa/octeon_ep/octep_vdpa_main.c | 4 ++-
>> 3 files changed, 60 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/vdpa/octeon_ep/octep_vdpa.h
>b/drivers/vdpa/octeon_ep/octep_vdpa.h
>> index 2d4bb07f91b3..0f83a1eca408 100644
>> --- a/drivers/vdpa/octeon_ep/octep_vdpa.h
>> +++ b/drivers/vdpa/octeon_ep/octep_vdpa.h
>> @@ -8,6 +8,7 @@
>> #include <linux/pci_regs.h>
>> #include <linux/vdpa.h>
>> #include <linux/virtio_pci_modern.h>
>> +#include <uapi/linux/virtio_crypto.h>
>> #include <uapi/linux/virtio_net.h>
>> #include <uapi/linux/virtio_blk.h>
>> #include <uapi/linux/virtio_config.h>
>> @@ -52,6 +53,28 @@ struct octep_vring_info {
>> phys_addr_t notify_pa;
>> };
>>
>> +enum octep_pci_vndr_cfg_type {
>> + OCTEP_PCI_VNDR_CFG_TYPE_VIRTIO_ID,
>> + OCTEP_PCI_VNDR_CFG_TYPE_MAX,
>> +};
>> +
>> +struct octep_pci_vndr_data {
>> + u8 cap_vndr;
>> + u8 cap_next;
>> + u8 cap_len;
>> + u8 cfg_type;
>> + u16 vendor_id;
>
>Is this better to define the above in uapi/linux/virtio_pci.h?
I will move the standard defines to uapi/linux/virtio_pci.h
The defines are:
/* PCI vendor data config_generation */
#define VIRTIO_PCI_CAP_VENDOR_CFG 9
/* This is the PCI vendor data capability header: */
struct virtio_pci_vndr_data {
__u8 cap_vndr; /* Generic PCI field: PCI_CAP_ID_VNDR */
__u8 cap_next; /* Generic PCI field: next ptr. */
__u8 cap_len; /* Generic PCI field: capability length */
__u8 cfg_type; /* Identifies the structure. */
__u16 vendor_id; /* Identifies the vendor-specific format. */
};
Thanks,
Shijith
Powered by blists - more mailing lists