qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Markus Armbruster <armbru@redhat.com>,
	Anthony Liguori <aliguori@amazon.com>,
	Le Tan <tamlokveer@gmail.com>
Subject: [Qemu-devel] [PATCH] intel_iommu: fix VTD_SID_TO_BUS
Date: Mon, 20 Oct 2014 12:40:02 +0300	[thread overview]
Message-ID: <1413797938-18100-1-git-send-email-mst@redhat.com> (raw)

(((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

             reply	other threads:[~2014-10-20  9:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20  9:40 Michael S. Tsirkin [this message]
2014-10-20 11:41 ` [Qemu-devel] [PATCH] intel_iommu: fix VTD_SID_TO_BUS 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1413797938-18100-1-git-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=tamlokveer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).