From: David Kiarie <davidkiarie4@gmail.com>
To: qemu-devel@nongnu.org, peter.maydell@linaro.org,
jan.kiszka@web.de, mst@redhat.com, peterx@redhat.com
Cc: David Kiarie <davidkiarie4@gmail.com>
Subject: [Qemu-devel] [v19 1/4] hw/pci: Prepare for AMD IOMMU
Date: Tue, 20 Sep 2016 18:42:31 +0300 [thread overview]
Message-ID: <1474386154-2793-2-git-send-email-davidkiarie4@gmail.com> (raw)
In-Reply-To: <1474386154-2793-1-git-send-email-davidkiarie4@gmail.com>
Introduce PCI macros from for use by AMD IOMMU
Signed-off-by: David Kiarie <davidkiarie4@gmail.com>
---
include/hw/pci/pci.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index e8b83bb..772692f 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -13,9 +13,12 @@
/* PCI bus */
#define PCI_DEVFN(slot, func) ((((slot) & 0x1f) << 3) | ((func) & 0x07))
+#define PCI_BUS_NUM(x) (((x) >> 8) & 0xff)
#define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f)
#define PCI_FUNC(devfn) ((devfn) & 0x07)
#define PCI_BUILD_BDF(bus, devfn) ((bus << 8) | (devfn))
+#define PCI_BUS_MAX 256
+#define PCI_DEVFN_MAX 256
#define PCI_SLOT_MAX 32
#define PCI_FUNC_MAX 8
--
2.1.4
next prev parent reply other threads:[~2016-09-20 15:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-20 15:42 [Qemu-devel] [v19 0/4] AMD IOMMU David Kiarie
2016-09-20 15:42 ` David Kiarie [this message]
2016-09-20 15:42 ` [Qemu-devel] [v19 2/4] hw/i386/trace-events: Add AMD IOMMU trace events David Kiarie
2016-09-20 15:42 ` [Qemu-devel] [v19 3/4] hw/i386: Introduce AMD IOMMU David Kiarie
2016-09-30 13:55 ` [Qemu-devel] [v19 0/4] " Paolo Bonzini
2016-09-30 13:57 ` David Kiarie
2016-10-01 16:55 ` David Kiarie
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=1474386154-2793-2-git-send-email-davidkiarie4@gmail.com \
--to=davidkiarie4@gmail.com \
--cc=jan.kiszka@web.de \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).