mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
virtio-pci: add handling of PCI ATS and Device-TLB enable/disable
According to PCIe Address Translation Services specification 5.1.3., ATS Control Register has Enable bit to enable/disable ATS. Guest may enable/disable PCI ATS and, accordingly, Device-TLB for the VirtIO PCI device. So, raise/lower a flag and call a trigger function to pass this event to a device implementation. Signed-off-by: Viktor Prutyanov <viktor@daynix.com> Message-Id: <20230512135122.70403-2-viktor@daynix.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
9e57b81861
commit
206e91d143
2 changed files with 38 additions and 0 deletions
|
@ -155,6 +155,7 @@ struct VirtIODevice
|
|||
QLIST_HEAD(, VirtQueue) *vector_queues;
|
||||
QTAILQ_ENTRY(VirtIODevice) next;
|
||||
EventNotifier config_notifier;
|
||||
bool device_iotlb_enabled;
|
||||
};
|
||||
|
||||
struct VirtioDeviceClass {
|
||||
|
@ -212,6 +213,7 @@ struct VirtioDeviceClass {
|
|||
const VMStateDescription *vmsd;
|
||||
bool (*primary_unplug_pending)(void *opaque);
|
||||
struct vhost_dev *(*get_vhost)(VirtIODevice *vdev);
|
||||
void (*toggle_device_iotlb)(VirtIODevice *vdev);
|
||||
};
|
||||
|
||||
void virtio_instance_init_common(Object *proxy_obj, void *data,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue