qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] intel_iommu: fix VTD_SID_TO_BUS
@ 2014-10-20  9:40 Michael S. Tsirkin
  2014-10-20 11:41 ` Markus Armbruster
  0 siblings, 1 reply; 13+ messages in thread
From: Michael S. Tsirkin @ 2014-10-20  9:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: Markus Armbruster, Anthony Liguori, Le Tan

(((sid) >> 8) && 0xff)  makes no sense
(((sid) >> 8) & 0xff) seems to be what was meant.

Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---

Compile-tested only.

 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

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-10-20 22:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-20  9:40 [Qemu-devel] [PATCH] intel_iommu: fix VTD_SID_TO_BUS Michael S. Tsirkin
2014-10-20 11:41 ` Markus Armbruster
2014-10-20 12:14   ` Le Tan
2014-10-20 14:23     ` Michael S. Tsirkin
2014-10-20 14:37       ` Jan Kiszka
2014-10-20 17:20         ` Michael S. Tsirkin
2014-10-20 18:27           ` Jan Kiszka
2014-10-20 15:15       ` Knut Omang
2014-10-20 18:18         ` Jan Kiszka
2014-10-20 19:03           ` Knut Omang
2014-10-20 19:37             ` Knut Omang
2014-10-20 22:53             ` Knut Omang
2014-10-20 14:48     ` Knut Omang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).