From ede9c94acf6cd1968de4188c0228b714ab871a86 Mon Sep 17 00:00:00 2001 From: Peter Xu Date: Thu, 14 Jul 2016 13:56:29 +0800 Subject: intel_iommu: add SID validation for IR This patch enables SID validation. Invalid interrupts will be dropped. Signed-off-by: Peter Xu Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/i386/intel_iommu.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include/hw/i386/intel_iommu.h') 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 { -- cgit v1.2.3