Skip to content

Commit

Permalink
xen/arm: introduce XENFEAT_grant_map_identity
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefano Stabellini committed Sep 11, 2014
1 parent 0b5a506 commit 5ebc77d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/arm/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,12 @@ static int __init xen_guest_init(void)
xen_domain_type = XEN_HVM_DOMAIN;

xen_setup_features();

if (!xen_feature(XENFEAT_grant_map_identity)) {
pr_warn("Please upgrade your Xen.\n"
"If your platform has any non-coherent DMA devices, they won't work properly.\n");
}

if (xen_feature(XENFEAT_dom0))
xen_start_info->flags |= SIF_INITDOMAIN|SIF_PRIVILEGED;
else
Expand Down
3 changes: 3 additions & 0 deletions include/xen/interface/features.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
/* operation as Dom0 is supported */
#define XENFEAT_dom0 11

/* Xen also maps grant references at pfn = mfn */
#define XENFEAT_grant_map_identity 12

#define XENFEAT_NR_SUBMAPS 1

#endif /* __XEN_PUBLIC_FEATURES_H__ */

0 comments on commit 5ebc77d

Please sign in to comment.