From: Peter Xu Date: Mon, 31 Oct 2016 07:34:40 +0000 (+0800) Subject: intel_iommu: fix incorrect assert X-Git-Tag: qemu-xen-4.9.0-rc1~59^2~22 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8e7a0a1616faa852d65427bbbb6296dffb38990d;p=qemu-xen.git intel_iommu: fix incorrect assert Reported-by: Michael S. Tsirkin Signed-off-by: Peter Xu Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 20c4d2c3b7..1b706adf9d 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -2463,7 +2463,7 @@ static AddressSpace *vtd_host_dma_iommu(PCIBus *bus, void *opaque, int devfn) IntelIOMMUState *s = opaque; VTDAddressSpace *vtd_as; - assert(0 <= devfn && devfn <= X86_IOMMU_PCI_DEVFN_MAX); + assert(0 <= devfn && devfn < X86_IOMMU_PCI_DEVFN_MAX); vtd_as = vtd_find_add_as(s, bus, devfn); return &vtd_as->as;