1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Copyright(c) 2023 Advanced Micro Devices, Inc */
8 #include <linux/vdpa.h>
10 struct pds_vdpa_vq_info
{
27 struct vdpa_callback event_cb
;
28 struct pds_vdpa_device
*pdsv
;
31 #define PDS_VDPA_MAX_QUEUES 65
32 #define PDS_VDPA_MAX_QLEN 32768
33 struct pds_vdpa_device
{
34 struct vdpa_device vdpa_dev
;
35 struct pds_vdpa_aux
*vdpa_aux
;
37 struct pds_vdpa_vq_info vqs
[PDS_VDPA_MAX_QUEUES
];
38 u64 supported_features
; /* supported device features */
39 u64 negotiated_features
; /* negotiated features */
40 u8 vdpa_index
; /* rsvd for future subdevice use */
41 u8 num_vqs
; /* num vqs in use */
42 u8 mac
[ETH_ALEN
]; /* mac selected when the device was added */
43 struct vdpa_callback config_cb
;
44 struct notifier_block nb
;
47 #define PDS_VDPA_PACKED_INVERT_IDX 0x8000
49 void pds_vdpa_release_irqs(struct pds_vdpa_device
*pdsv
);
50 int pds_vdpa_get_mgmt_info(struct pds_vdpa_aux
*vdpa_aux
);
51 #endif /* _VDPA_DEV_H_ */