diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2014-11-21 11:08:39 +0000 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2014-12-04 12:41:54 +0000 |
commit | da095a996090a412c3b6292c7a8680661dca157d (patch) | |
tree | 02247bce77b50867c227384ed023bab81ffe77c4 /include/xen | |
parent | a4dba130891271084344c12537731542ec77cb85 (diff) | |
download | linux-da095a996090a412c3b6292c7a8680661dca157d.tar.gz linux-da095a996090a412c3b6292c7a8680661dca157d.tar.bz2 linux-da095a996090a412c3b6292c7a8680661dca157d.zip |
xen/arm: introduce GNTTABOP_cache_flush
Introduce support for new hypercall GNTTABOP_cache_flush.
Use it to perform cache flashing on pages used for dma when necessary.
If GNTTABOP_cache_flush is supported by the hypervisor, we don't need to
bounce dma map operations that involve foreign grants and non-coherent
devices.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'include/xen')
-rw-r--r-- | include/xen/interface/grant_table.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/xen/interface/grant_table.h b/include/xen/interface/grant_table.h index e40fae9bf11a..bcce56439d64 100644 --- a/include/xen/interface/grant_table.h +++ b/include/xen/interface/grant_table.h @@ -479,6 +479,25 @@ struct gnttab_get_version { DEFINE_GUEST_HANDLE_STRUCT(gnttab_get_version); /* + * Issue one or more cache maintenance operations on a portion of a + * page granted to the calling domain by a foreign domain. + */ +#define GNTTABOP_cache_flush 12 +struct gnttab_cache_flush { + union { + uint64_t dev_bus_addr; + grant_ref_t ref; + } a; + uint16_t offset; /* offset from start of grant */ + uint16_t length; /* size within the grant */ +#define GNTTAB_CACHE_CLEAN (1<<0) +#define GNTTAB_CACHE_INVAL (1<<1) +#define GNTTAB_CACHE_SOURCE_GREF (1<<31) + uint32_t op; +}; +DEFINE_GUEST_HANDLE_STRUCT(gnttab_cache_flush); + +/* * Bitfield values for update_pin_status.flags. */ /* Map the grant entry for access by I/O devices. */ |