xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: elena.ufimtseva@oracle.com
To: xen-devel@lists.xen.org
Cc: Elena Ufimtseva <elena.ufimtseva@oracle.com>,
	kevin.tian@intel.com, tim@xen.org, jbeulich@suse.com,
	yang.z.zhang@intel.com, boris.ostrovsky@oracle.com
Subject: [PATCH v9 1/4] pci: add PCI_SBDF and PCI_SEG macros
Date: Wed,  8 Jul 2015 21:50:23 -0400	[thread overview]
Message-ID: <1436406626-7841-2-git-send-email-elena.ufimtseva@oracle.com> (raw)
In-Reply-To: <1436406626-7841-1-git-send-email-elena.ufimtseva@oracle.com>

From: Elena Ufimtseva <elena.ufimtseva@oracle.com>

In preparation for patch "iommu: add rmrr Xen command line option for
extra rmrrs" which will use it.

Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
---
 xen/include/xen/pci.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h
index 3908146..414106a 100644
--- a/xen/include/xen/pci.h
+++ b/xen/include/xen/pci.h
@@ -33,6 +33,8 @@
 #define PCI_DEVFN2(bdf) ((bdf) & 0xff)
 #define PCI_BDF(b,d,f)  ((((b) & 0xff) << 8) | PCI_DEVFN(d,f))
 #define PCI_BDF2(b,df)  ((((b) & 0xff) << 8) | ((df) & 0xff))
+#define PCI_SBDF(s,b,d,f) ((((s) & 0xffff) << 16) | PCI_BDF(b,d,f))
+#define PCI_SEG(sbdf) (((sbdf) >> 16) & 0xffff)
 
 struct pci_dev_info {
     bool_t is_extfn;
-- 
2.1.3

  reply	other threads:[~2015-07-09  1:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09  1:50 [PATCH v9 0/4] iommu: add rmrr Xen command line option elena.ufimtseva
2015-07-09  1:50 ` elena.ufimtseva [this message]
2015-07-09  1:50 ` [PATCH v9 2/4] iommu VT-d: separate rmrr addition function elena.ufimtseva
2015-07-09 18:59   ` Konrad Rzeszutek Wilk
2015-07-09  1:50 ` [PATCH v9 3/4] pci: add wrapper for parse_pci elena.ufimtseva
2015-07-09  1:50 ` [PATCH v9 4/4] iommu: add rmrr Xen command line option for extra rmrrs elena.ufimtseva
2015-07-09 19:01   ` Konrad Rzeszutek Wilk

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=1436406626-7841-2-git-send-email-elena.ufimtseva@oracle.com \
    --to=elena.ufimtseva@oracle.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jbeulich@suse.com \
    --cc=kevin.tian@intel.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    --cc=yang.z.zhang@intel.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).