iommu/virtio: Add event queue
The event queue offers a way for the device to report access faults from endpoints. It is implemented on virtqueue #1. Whenever the host needs to signal a fault, it fills one of the buffers offered by the guest and interrupts it. Tested-by: Bharat Bhushan <bharat.bhushan@nxp.com> Tested-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:

committed by
Michael S. Tsirkin

parent
2a5a314874
commit
169a126c6e
@@ -139,4 +139,23 @@ struct virtio_iommu_req_probe {
|
||||
*/
|
||||
};
|
||||
|
||||
/* Fault types */
|
||||
#define VIRTIO_IOMMU_FAULT_R_UNKNOWN 0
|
||||
#define VIRTIO_IOMMU_FAULT_R_DOMAIN 1
|
||||
#define VIRTIO_IOMMU_FAULT_R_MAPPING 2
|
||||
|
||||
#define VIRTIO_IOMMU_FAULT_F_READ (1 << 0)
|
||||
#define VIRTIO_IOMMU_FAULT_F_WRITE (1 << 1)
|
||||
#define VIRTIO_IOMMU_FAULT_F_EXEC (1 << 2)
|
||||
#define VIRTIO_IOMMU_FAULT_F_ADDRESS (1 << 8)
|
||||
|
||||
struct virtio_iommu_fault {
|
||||
__u8 reason;
|
||||
__u8 reserved[3];
|
||||
__le32 flags;
|
||||
__le32 endpoint;
|
||||
__u8 reserved2[4];
|
||||
__le64 address;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user