Received: from eggs.gnu.org ([2001:4830:134:3::10]:57448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c177A-0005sI-1X for qemu-devel@nongnu.org; Mon, 31 Oct 2016 03:34:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1779-0007RF-B9 for qemu-devel@nongnu.org; Mon, 31 Oct 2016 03:34:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57054) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c1779-0007Pw-5i for qemu-devel@nongnu.org; Mon, 31 Oct 2016 03:34:39 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 720153DE3E for ; Mon, 31 Oct 2016 07:34:38 +0000 (UTC) From: Peter Xu Date: Mon, 31 Oct 2016 15:34:40 +0800 Message-Id: <1477899280-29857-4-git-send-email-peterx@redhat.com> In-Reply-To: <1477899280-29857-1-git-send-email-peterx@redhat.com> References: <1477899280-29857-1-git-send-email-peterx@redhat.com> Subject: [Qemu-devel] [PATCH 3/3] intel_iommu: fix incorrect assert List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: imammedo@redhat.com, peterx@redhat.com, mst@redhat.com Reported-by: Michael S. Tsirkin Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 168cd5f..17a3de1 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; -- 2.7.4