Skip to content

Commit

Permalink
intel_iommu: fix VTD_SID_TO_BUS
Browse files Browse the repository at this point in the history
(((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>
  • Loading branch information
mstsirkin committed Nov 2, 2014
1 parent 68a27b2 commit 1e06f13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/hw/i386/intel_iommu.h
Expand Up @@ -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
Expand Down

0 comments on commit 1e06f13

Please sign in to comment.