xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Roger Pau Monne <roger.pau@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Keir Fraser <keir@xen.org>, Jan Beulich <jbeulich@suse.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: [PATCH 3/3] xen: expose that grant table mappings update the IOMMU
Date: Mon, 7 Apr 2014 18:02:04 +0200	[thread overview]
Message-ID: <1396886524-16921-4-git-send-email-roger.pau@citrix.com> (raw)
In-Reply-To: <1396886524-16921-1-git-send-email-roger.pau@citrix.com>

Add a new XENFEAT_hvm_gntmap_supports_iommu that is used to check
whether the hypervisor properly updates the IOMMU on auto-translated
guests when doing a grant table map/unmap operation.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Keir Fraser <keir@xen.org>
Cc: Jan Beulich <jbeulich@suse.com>
---
 xen/common/kernel.c           |    2 ++
 xen/include/public/features.h |    6 ++++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/xen/common/kernel.c b/xen/common/kernel.c
index b371f8f..7589dc1 100644
--- a/xen/common/kernel.c
+++ b/xen/common/kernel.c
@@ -316,11 +316,13 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
             case guest_type_pvh:
                 fi.submap |= (1U << XENFEAT_hvm_safe_pvclock) |
                              (1U << XENFEAT_supervisor_mode_kernel) |
+                             (1U << XENFEAT_hvm_gntmap_supports_iommu) |
                              (1U << XENFEAT_hvm_callback_vector);
                 break;
             case guest_type_hvm:
                 fi.submap |= (1U << XENFEAT_hvm_safe_pvclock) |
                              (1U << XENFEAT_hvm_callback_vector) |
+                             (1U << XENFEAT_hvm_gntmap_supports_iommu) |
                              (1U << XENFEAT_hvm_pirqs);
                 break;
             }
diff --git a/xen/include/public/features.h b/xen/include/public/features.h
index a149aa6..eaa0187 100644
--- a/xen/include/public/features.h
+++ b/xen/include/public/features.h
@@ -94,6 +94,12 @@
 /* operation as Dom0 is supported */
 #define XENFEAT_dom0                      11
 
+/*
+ * If set, GNTTABOP_map_grant_ref sets the proper IOMMU mappings so the
+ * resulting mapped page can be used for IO with hardware devices.
+ */
+#define XENFEAT_hvm_gntmap_supports_iommu 12
+
 #define XENFEAT_NR_SUBMAPS 1
 
 #endif /* __XEN_PUBLIC_FEATURES_H__ */
-- 
1.7.7.5 (Apple Git-26)


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2014-04-07 16:03 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-07 16:02 [PATCH 0/3] Fix grant map/unmap with auto-translated guests Roger Pau Monne
2014-04-07 16:02 ` [PATCH 1/3] iommu: set correct IOMMU entries when iommu_hap_pt_share == 0 Roger Pau Monne
2014-04-07 16:49   ` Konrad Rzeszutek Wilk
2014-04-08  8:30   ` Jan Beulich
2014-04-08  9:19     ` Roger Pau Monné
2014-04-08  9:55       ` Jan Beulich
2014-04-08 14:12     ` Tim Deegan
2014-04-08 15:15       ` Roger Pau Monné
2014-04-08 15:29         ` Jan Beulich
2014-04-13 20:27         ` Tim Deegan
2014-04-16 14:36     ` Roger Pau Monné
2014-04-16 14:41       ` Jan Beulich
2014-04-07 16:02 ` [PATCH 2/3] amd-iommu: disable iommu_hap_pt_share with AMD IOMMUs Roger Pau Monne
2014-04-07 16:51   ` Konrad Rzeszutek Wilk
2014-04-07 16:54     ` George Dunlap
2014-04-08  7:29       ` Roger Pau Monné
2014-04-08  8:52   ` Jan Beulich
2014-04-08 14:16     ` Tim Deegan
2014-04-08 14:36       ` Jan Beulich
2014-04-08 15:39     ` Roger Pau Monné
2014-04-07 16:02 ` Roger Pau Monne [this message]
2014-04-08  8:34   ` [PATCH 3/3] xen: expose that grant table mappings update the IOMMU Ian Campbell
2014-04-08  8:56     ` Jan Beulich
2014-04-08  8:58       ` Ian Campbell
2014-04-08  9:53         ` Jan Beulich
2014-04-08  9:57           ` Ian Campbell
2014-04-08 10:05             ` Jan Beulich
2014-04-08 10:26               ` Ian Campbell
2014-04-08 10:31                 ` 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=1396886524-16921-4-git-send-email-roger.pau@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xenproject.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).