summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2016-07-14 13:56:29 +0800
committerMichael S. Tsirkin <mst@redhat.com>2016-07-21 20:44:16 +0300
commitede9c94acf6cd1968de4188c0228b714ab871a86 (patch)
treeb7c3e115de240c7529dc58c064d3fcb199261d62 /include
parent28589311b326398e88bf6804db8575a6da426b39 (diff)
downloadqemu-ede9c94acf6cd1968de4188c0228b714ab871a86.zip
intel_iommu: add SID validation for IR
This patch enables SID validation. Invalid interrupts will be dropped. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/i386/intel_iommu.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/hw/i386/intel_iommu.h b/include/hw/i386/intel_iommu.h
index 745b4e7687..2eba7ed4db 100644
--- a/include/hw/i386/intel_iommu.h
+++ b/include/hw/i386/intel_iommu.h
@@ -102,6 +102,23 @@ struct VTDIOTLBEntry {
bool write_flags;
};
+/* VT-d Source-ID Qualifier types */
+enum {
+ VTD_SQ_FULL = 0x00, /* Full SID verification */
+ VTD_SQ_IGN_3 = 0x01, /* Ignore bit 3 */
+ VTD_SQ_IGN_2_3 = 0x02, /* Ignore bits 2 & 3 */
+ VTD_SQ_IGN_1_3 = 0x03, /* Ignore bits 1-3 */
+ VTD_SQ_MAX,
+};
+
+/* VT-d Source Validation Types */
+enum {
+ VTD_SVT_NONE = 0x00, /* No validation */
+ VTD_SVT_ALL = 0x01, /* Do full validation */
+ VTD_SVT_BUS = 0x02, /* Validate bus range */
+ VTD_SVT_MAX,
+};
+
/* Interrupt Remapping Table Entry Definition */
union VTD_IRTE {
struct {