]> git.proxmox.com Git - mirror_qemu.git/commitdiff
intel_iommu: fix VTD_SID_TO_BUS
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 20 Oct 2014 09:37:23 +0000 (12:37 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 2 Nov 2014 10:03:04 +0000 (12:03 +0200)
(((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 <mst@redhat.com>
include/hw/i386/intel_iommu.h

index f4701e1c60d2d12cae7411592c4c41423bf815f8..e321ee4fbceaa5753899907b9fecb998d302b255 100644 (file)
@@ -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