From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xgr4S-00028g-8X for qemu-devel@nongnu.org; Wed, 22 Oct 2014 04:15:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xgr4M-0005o5-Gb for qemu-devel@nongnu.org; Wed, 22 Oct 2014 04:15:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xgr4M-0005nv-AF for qemu-devel@nongnu.org; Wed, 22 Oct 2014 04:14:58 -0400 Date: Wed, 22 Oct 2014 11:18:31 +0300 From: "Michael S. Tsirkin" Message-ID: <1413965859-7698-9-git-send-email-mst@redhat.com> References: <1413965859-7698-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1413965859-7698-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL v2 8/9] intel_iommu: fix VTD_SID_TO_BUS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Anthony Liguori (((sid) >> 8) && 0xff) makes no sense (((sid) >> 8) & 0xff) seems to be what was meant. https://bugs.launchpad.net/qemu/+bug/1382477 Signed-off-by: Michael S. Tsirkin --- include/hw/i386/intel_iommu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/i386/intel_iommu.h b/include/hw/i386/intel_iommu.h index f4701e1..e321ee4 100644 --- a/include/hw/i386/intel_iommu.h +++ b/include/hw/i386/intel_iommu.h @@ -37,7 +37,7 @@ #define VTD_PCI_DEVFN_MAX 256 #define VTD_PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) #define VTD_PCI_FUNC(devfn) ((devfn) & 0x07) -#define VTD_SID_TO_BUS(sid) (((sid) >> 8) && 0xff) +#define VTD_SID_TO_BUS(sid) (((sid) >> 8) & 0xff) #define VTD_SID_TO_DEVFN(sid) ((sid) & 0xff) #define DMAR_REG_SIZE 0x230 -- MST