summaryrefslogtreecommitdiff
path: root/hw/i386/amd_iommu.c
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2018-12-20 13:40:36 +0800
committerMichael S. Tsirkin <mst@redhat.com>2018-12-20 13:25:11 -0500
commita924b3d8df55a395891fd5ed341d0deb135d9aa6 (patch)
treee6ba485ec8d04620f890c5402a44d8a16caddc0e /hw/i386/amd_iommu.c
parentb2fc91db84470a78f8e93f5b5f913c17188792c8 (diff)
downloadqemu-a924b3d8df55a395891fd5ed341d0deb135d9aa6.zip
x86-iommu: switch intr_supported to OnOffAuto type
Switch the intr_supported variable from a boolean to OnOffAuto type so that we can know whether the user specified it or not. With that we'll have a chance to help the user to choose more wisely where possible. Introduce x86_iommu_ir_supported() to mask these changes. No functional change at all. Signed-off-by: Peter Xu <peterx@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/amd_iommu.c')
-rw-r--r--hw/i386/amd_iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
index 353a810e6b..8ad707aba0 100644
--- a/hw/i386/amd_iommu.c
+++ b/hw/i386/amd_iommu.c
@@ -1233,7 +1233,7 @@ static int amdvi_int_remap_msi(AMDVIState *iommu,
}
/* validate that we are configure with intremap=on */
- if (!X86_IOMMU_DEVICE(iommu)->intr_supported) {
+ if (!x86_iommu_ir_supported(X86_IOMMU_DEVICE(iommu))) {
trace_amdvi_err("Interrupt remapping is enabled in the guest but "
"not in the host. Use intremap=on to enable interrupt "
"remapping in amd-iommu.");