All of lore.kernel.org
 help / color / mirror / Atom feed
From: Elena Ufimtseva <elena.ufimtseva@oracle.com>
To: xen-devel@lists.xen.org
Cc: kevin.tian@intel.com, tim@xen.org, jbeulich@suse.com,
	yang.z.zhang@intel.com, boris.ostrovsky@oracle.com,
	roger.pau@citrix.com
Subject: [PATCH RFC 3/5] pvh: add rwmem_ranges to keep mapped special regions
Date: Fri, 13 Feb 2015 13:52:00 -0500	[thread overview]
Message-ID: <20150213185158.GA12737@elena.ufimtseva> (raw)

Patch adds rwmem_ranges in arch_hvm_iommu to keep specail regions
specified by dom0_iommu_rwmem boot option.
These special regions mapped with p2m_sys_rw type introduced
in the previous patch.

TODO:
- specify mapped flag in rwmem_range struct to indicte that actual mapping
  was successful;

Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
---
 xen/drivers/passthrough/x86/iommu.c |    1 +
 xen/include/asm-x86/hvm/iommu.h     |    2 ++
 xen/include/xen/iommu.h             |    5 +++++
 3 files changed, 8 insertions(+)

diff --git a/xen/drivers/passthrough/x86/iommu.c b/xen/drivers/passthrough/x86/iommu.c
index 52d8948..2e266a7 100644
--- a/xen/drivers/passthrough/x86/iommu.c
+++ b/xen/drivers/passthrough/x86/iommu.c
@@ -118,6 +118,7 @@ int arch_iommu_domain_init(struct domain *d)
     spin_lock_init(&hd->arch.mapping_lock);
     INIT_LIST_HEAD(&hd->arch.g2m_ioport_list);
     INIT_LIST_HEAD(&hd->arch.mapped_rmrrs);
+    INIT_LIST_HEAD(&hd->arch.rwmem_ranges);
 
     return 0;
 }
diff --git a/xen/include/asm-x86/hvm/iommu.h b/xen/include/asm-x86/hvm/iommu.h
index 46cb126..3261b5c 100644
--- a/xen/include/asm-x86/hvm/iommu.h
+++ b/xen/include/asm-x86/hvm/iommu.h
@@ -2,6 +2,7 @@
 #define __ASM_X86_HVM_IOMMU_H__
 
 #include <xen/errno.h>
+#include <xen/iommu.h>
 
 struct iommu_ops;
 extern const struct iommu_ops intel_iommu_ops;
@@ -54,6 +55,7 @@ struct arch_hvm_iommu
     struct list_head g2m_ioport_list;   /* guest to machine ioport mapping */
     u64 iommu_bitmap;              /* bitmap of iommu(s) that the domain uses */
     struct list_head mapped_rmrrs;
+    struct list_head rwmem_ranges;
 
     /* amd iommu support */
     int paging_mode;
diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h
index 8eb764a..a5762e0 100644
--- a/xen/include/xen/iommu.h
+++ b/xen/include/xen/iommu.h
@@ -191,4 +191,9 @@ DECLARE_PER_CPU(bool_t, iommu_dont_flush_iotlb);
 extern struct spinlock iommu_pt_cleanup_lock;
 extern struct page_list_head iommu_pt_cleanup_list;
 
+struct rwmem_range {
+    struct list_head list;
+    u64 start, end;
+};
+
 #endif /* _IOMMU_H_ */
-- 
1.7.10.4

             reply	other threads:[~2015-02-13 18:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-13 18:52 Elena Ufimtseva [this message]
2015-02-17 12:27 ` [PATCH RFC 3/5] pvh: add rwmem_ranges to keep mapped special regions Jan Beulich

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=20150213185158.GA12737@elena.ufimtseva \
    --to=elena.ufimtseva@oracle.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jbeulich@suse.com \
    --cc=kevin.tian@intel.com \
    --cc=roger.pau@citrix.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 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.