mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
virtio: get class_id and pci device id by the virtio id
Add helpers to get the "Transitional PCI Device ID" and "class_id" of the device specified by the "Virtio Device ID". These helpers will be used to build the generic vDPA device later. Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Longpeng <longpeng2@huawei.com> Message-Id: <20221215134944.2809-2-longpeng2@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
ee1c08bd73
commit
2273324540
2 changed files with 93 additions and 0 deletions
|
@ -151,6 +151,8 @@ struct VirtIOPCIProxy {
|
|||
bool disable_modern;
|
||||
bool ignore_backend_features;
|
||||
OnOffAuto disable_legacy;
|
||||
/* Transitional device id */
|
||||
uint16_t trans_devid;
|
||||
uint32_t class_code;
|
||||
uint32_t nvectors;
|
||||
uint32_t dfselect;
|
||||
|
@ -184,6 +186,9 @@ static inline void virtio_pci_disable_modern(VirtIOPCIProxy *proxy)
|
|||
proxy->disable_modern = true;
|
||||
}
|
||||
|
||||
uint16_t virtio_pci_get_trans_devid(uint16_t device_id);
|
||||
uint16_t virtio_pci_get_class_id(uint16_t device_id);
|
||||
|
||||
/*
|
||||
* virtio-input-pci: This extends VirtioPCIProxy.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue