From: Peter Xu <peterx@redhat.com>
To: David Kiarie <davidkiarie4@gmail.com>
Cc: qemu-devel@nongnu.org, rkrcmar@redhat.com, jan.kiszka@web.de,
valentine.sinitsyn@gmail.com, ehabkost@redhat.com,
mst@redhat.com
Subject: Re: [Qemu-devel] [V15 1/4] hw/pci: Prepare for AMD IOMMU
Date: Mon, 8 Aug 2016 17:01:11 +0800 [thread overview]
Message-ID: <20160808090111.GH3825@pxdev.xzpeter.org> (raw)
In-Reply-To: <1470127147-12442-2-git-send-email-davidkiarie4@gmail.com>
On Tue, Aug 02, 2016 at 11:39:04AM +0300, David Kiarie wrote:
> Introduce PCI macros from for use by AMD IOMMU
>
> Signed-off-by: David Kiarie <davidkiarie4@gmail.com>
> ---
> include/hw/pci/pci.h | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
> index 929ec2f..d47e0e6 100644
> --- a/include/hw/pci/pci.h
> +++ b/include/hw/pci/pci.h
> @@ -11,11 +11,14 @@
> #include "hw/pci/pcie.h"
>
> /* PCI bus */
> -
> +#define PCI_BDF(bus, devfn) ((((uint16_t)(bus)) << 8) | (devfn))
Seems the same as PCI_BUILD_BDF() below?
> #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
>
-- peterx
next prev parent reply other threads:[~2016-08-08 9:01 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-02 8:39 [Qemu-devel] [V15 0/4] AMD IOMMU David Kiarie
2016-08-02 8:39 ` [Qemu-devel] [V15 1/4] hw/pci: Prepare for " David Kiarie
2016-08-08 9:01 ` Peter Xu [this message]
2016-08-08 9:25 ` David Kiarie
2016-08-02 8:39 ` [Qemu-devel] [V15 2/4] hw/i386/trace-events: Add AMD IOMMU trace events David Kiarie
2016-08-02 8:39 ` [Qemu-devel] [V15 3/4] hw/i386: Introduce AMD IOMMU David Kiarie
2016-08-09 5:44 ` Peter Xu
2016-08-09 12:07 ` David Kiarie
2016-08-09 12:21 ` Peter Xu
2016-08-09 12:52 ` David Kiarie
2016-08-09 13:01 ` Valentine Sinitsyn
2016-08-09 13:17 ` David Kiarie
2016-08-10 2:08 ` Peter Xu
2016-08-10 6:30 ` David Kiarie
2016-08-09 17:46 ` David Kiarie
2016-08-10 1:49 ` Peter Xu
2016-08-11 8:23 ` Valentine Sinitsyn
2016-08-11 8:32 ` David Kiarie
2016-08-11 8:35 ` Valentine Sinitsyn
2016-08-12 19:10 ` Valentine Sinitsyn
2016-08-12 19:40 ` David Kiarie
2016-08-12 19:41 ` Valentine Sinitsyn
2016-08-02 8:39 ` [Qemu-devel] [V15 4/4] hw/i386: AMD IOMMU IVRS table David Kiarie
2016-08-02 13:32 ` Igor Mammedov
-- strict thread matches above, loose matches on Subject: below --
2016-08-09 20:27 [Qemu-devel] [V15 0/4] AMD IOMMU David Kiarie
2016-08-09 20:27 ` [Qemu-devel] [V15 1/4] hw/pci: Prepare for " 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=20160808090111.GH3825@pxdev.xzpeter.org \
--to=peterx@redhat.com \
--cc=davidkiarie4@gmail.com \
--cc=ehabkost@redhat.com \
--cc=jan.kiszka@web.de \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rkrcmar@redhat.com \
--cc=valentine.sinitsyn@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.