aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2014-09-10 18:49:30 -0400
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2014-09-11 14:11:52 -0400
commit5ebc77de83c7b74543de774afa7395b3b790e65e (patch)
treeed73142a80e34fc36e66ac52231b66446ca9f72a
parent0b5a50635fc916cf46e3de0b819a61fc3f17e7ee (diff)
xen/arm: introduce XENFEAT_grant_map_identity
The flag tells us that the hypervisor maps a grant page to guest physical address == machine address of the page in addition to the normal grant mapping address. It is needed to properly issue cache maintenance operation at the completion of a DMA operation involving a foreign grant. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Tested-by: Denis Schneider <v1ne2go@gmail.com>
-rw-r--r--arch/arm/xen/enlighten.c6
-rw-r--r--include/xen/interface/features.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index 98544c5f86e9..0e15f011f9c8 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -260,6 +260,12 @@ static int __init xen_guest_init(void)
260 xen_domain_type = XEN_HVM_DOMAIN; 260 xen_domain_type = XEN_HVM_DOMAIN;
261 261
262 xen_setup_features(); 262 xen_setup_features();
263
264 if (!xen_feature(XENFEAT_grant_map_identity)) {
265 pr_warn("Please upgrade your Xen.\n"
266 "If your platform has any non-coherent DMA devices, they won't work properly.\n");
267 }
268
263 if (xen_feature(XENFEAT_dom0)) 269 if (xen_feature(XENFEAT_dom0))
264 xen_start_info->flags |= SIF_INITDOMAIN|SIF_PRIVILEGED; 270 xen_start_info->flags |= SIF_INITDOMAIN|SIF_PRIVILEGED;
265 else 271 else
diff --git a/include/xen/interface/features.h b/include/xen/interface/features.h
index 131a6ccdba25..14334d0161d5 100644
--- a/include/xen/interface/features.h
+++ b/include/xen/interface/features.h
@@ -53,6 +53,9 @@
53/* operation as Dom0 is supported */ 53/* operation as Dom0 is supported */
54#define XENFEAT_dom0 11 54#define XENFEAT_dom0 11
55 55
56/* Xen also maps grant references at pfn = mfn */
57#define XENFEAT_grant_map_identity 12
58
56#define XENFEAT_NR_SUBMAPS 1 59#define XENFEAT_NR_SUBMAPS 1
57 60
58#endif /* __XEN_PUBLIC_FEATURES_H__ */ 61#endif /* __XEN_PUBLIC_FEATURES_H__ */