Skip to content

Commit 1e06f13

Browse files
committed
intel_iommu: fix VTD_SID_TO_BUS
(((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 <[email protected]>
1 parent 68a27b2 commit 1e06f13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/hw/i386/intel_iommu.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#define VTD_PCI_DEVFN_MAX 256
3838
#define VTD_PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f)
3939
#define VTD_PCI_FUNC(devfn) ((devfn) & 0x07)
40-
#define VTD_SID_TO_BUS(sid) (((sid) >> 8) && 0xff)
40+
#define VTD_SID_TO_BUS(sid) (((sid) >> 8) & 0xff)
4141
#define VTD_SID_TO_DEVFN(sid) ((sid) & 0xff)
4242

4343
#define DMAR_REG_SIZE 0x230

0 commit comments

Comments
 (0)