hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field
The X86IOMMUState::pt_supported boolean was only set in the hw_compat_2_9[] array, via the 'pt=off' property. We removed all machines using that array, lets remove that property and all the code around it, always setting the VTD_ECAP_PT capability. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20250501210456.89071-19-philmd@linaro.org> [thuth: Dropped the hunks that were already merged via commit 31753d5a336f] Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-ID: <20260225092024.794595-16-thuth@redhat.com>
Philippe Mathieu-Daudé committed
Feb 25, 2026 at 10:20 UTC
c7b2e22bd95710e404c393e9f563cfe7404220c1
3 files changed
+2
-13
hw/i386/intel_iommu.c
+2
-11
@@ -1072,6 +1072,7 @@ static inline bool vtd_ce_type_check(X86IOMMUState *x86_iommu,
1072
{
1073
switch (vtd_ce_get_type(ce)) {
1074
case VTD_CONTEXT_TT_MULTI_LEVEL:
1075
+ case VTD_CONTEXT_TT_PASS_THROUGH:
1076
/* Always supported */
1077
break;
1078
case VTD_CONTEXT_TT_DEV_IOTLB:
@@ -1080,12 +1081,6 @@ static inline bool vtd_ce_type_check(X86IOMMUState *x86_iommu,
1081
return false;
1082
}
1083
break;
1083
- case VTD_CONTEXT_TT_PASS_THROUGH:
1084
- if (!x86_iommu->pt_supported) {
1085
- error_report_once("%s: PT specified but not supported", __func__);
1086
- return false;
1087
- }
1088
- break;
1084
default:
1085
/* Unknown type */
1086
error_report_once("%s: unknown ce type: %"PRIu32, __func__,
@@ -5004,7 +4999,7 @@ static void vtd_cap_init(IntelIOMMUState *s)
4999
{
5000
X86IOMMUState *x86_iommu = X86_IOMMU_DEVICE(s);
5001
5007
- s->cap = VTD_CAP_FRO | VTD_CAP_NFR | VTD_CAP_ND |
5002
+ s->cap = VTD_CAP_FRO | VTD_CAP_NFR | VTD_CAP_ND | VTD_ECAP_PT |
5003
VTD_CAP_MAMV | VTD_CAP_PSI | VTD_CAP_SSLPS |
5004
VTD_CAP_ESRTPS | VTD_CAP_MGAW(s->aw_bits);
5005
if (s->dma_drain) {
@@ -5032,10 +5027,6 @@ static void vtd_cap_init(IntelIOMMUState *s)
5027
s->ecap |= VTD_ECAP_DT;
5028
}
5029
5035
- if (x86_iommu->pt_supported) {
5036
- s->ecap |= VTD_ECAP_PT;
5037
- }
5038
-
5030
if (s->caching_mode) {
5031
s->cap |= VTD_CAP_CM;
5032
}
hw/i386/x86-iommu.c
-1
@@ -129,7 +129,6 @@ static const Property x86_iommu_properties[] = {
129
DEFINE_PROP_ON_OFF_AUTO("intremap", X86IOMMUState,
130
intr_supported, ON_OFF_AUTO_AUTO),
131
DEFINE_PROP_BOOL("device-iotlb", X86IOMMUState, dt_supported, false),
132
- DEFINE_PROP_BOOL("pt", X86IOMMUState, pt_supported, true),
132
DEFINE_PROP_BOOL("dma-translation", X86IOMMUState, dma_translation, true),
133
};
134
include/hw/i386/x86-iommu.h
-1
@@ -63,7 +63,6 @@ struct X86IOMMUState {
63
SysBusDevice busdev;
64
OnOffAuto intr_supported; /* Whether vIOMMU supports IR */
65
bool dt_supported; /* Whether vIOMMU supports DT */
66
- bool pt_supported; /* Whether vIOMMU supports pass-through */
66
bool dma_translation; /* Whether vIOMMU supports DMA translation */
67
QLIST_HEAD(, IEC_Notifier) iec_notifiers; /* IEC notify list */
68
};