File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1107,6 +1107,18 @@ static AddressSpace *virtio_pci_get_dma_as(DeviceState *d)
1107
1107
return pci_get_address_space (dev );
1108
1108
}
1109
1109
1110
+ static bool virtio_pci_queue_enabled (DeviceState * d , int n )
1111
+ {
1112
+ VirtIOPCIProxy * proxy = VIRTIO_PCI (d );
1113
+ VirtIODevice * vdev = virtio_bus_get_device (& proxy -> bus );
1114
+
1115
+ if (virtio_vdev_has_feature (vdev , VIRTIO_F_VERSION_1 )) {
1116
+ return proxy -> vqs [vdev -> queue_sel ].enabled ;
1117
+ }
1118
+
1119
+ return virtio_queue_enabled (vdev , n );
1120
+ }
1121
+
1110
1122
static int virtio_pci_add_mem_cap (VirtIOPCIProxy * proxy ,
1111
1123
struct virtio_pci_cap * cap )
1112
1124
{
@@ -2064,6 +2076,7 @@ static void virtio_pci_bus_class_init(ObjectClass *klass, void *data)
2064
2076
k -> ioeventfd_enabled = virtio_pci_ioeventfd_enabled ;
2065
2077
k -> ioeventfd_assign = virtio_pci_ioeventfd_assign ;
2066
2078
k -> get_dma_as = virtio_pci_get_dma_as ;
2079
+ k -> queue_enabled = virtio_pci_queue_enabled ;
2067
2080
}
2068
2081
2069
2082
static const TypeInfo virtio_pci_bus_info = {
You can’t perform that action at this time.
0 commit comments