All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/7] xen/arm: introduce GNTTABOP_cache_flush
@ 2014-10-10 11:42 Stefano Stabellini
  2014-10-10 11:43 ` [PATCH v4 1/7] xen: introduce gnttab_max_nr_maptrack_frames command line option Stefano Stabellini
                   ` (6 more replies)
  0 siblings, 7 replies; 20+ messages in thread
From: Stefano Stabellini @ 2014-10-10 11:42 UTC (permalink / raw)
  To: xen-devel; +Cc: Julien Grall, Ian Campbell, Stefano Stabellini

Hi all,
this patch series introduces a new hypercall to perform cache
maintenance operations on behalf of the guest. It is useful for dom0 to
be able to cache flush pages involved in a dma operation with
non-coherent devices.

It also removes XENFEAT_grant_map_identity as the feature is no longer
necessary: it was used to achieve the same goal but the guest can now
use the hypercall instead. Keeping the flag would also have a
significant performance impact as a new p2m mapping gets created and
then destroyed for every grant that is mapped and unmapped in dom0.


Changes in v4:
- add patch "xen: introduce gnttab_max_nr_maptrack_frames command line option";
- remove patch "introduce two different max_nr_dom0/domU_grant_frames
parameters";
- rename *_xen_dcache_* operations to *_dcache_*;
- implement the x86 cache maintenance functions using flush_area_local;
- ASSERT(spin_is_locked);
- return instead of break in grant_map_exists;
- pass a pointer to __gnttab_cache_flush;
- code style;
- unsigned int iterator in gnttab_cache_flush;
- return ret instead -ret;
- cflush.offset >= PAGE_SIZE return -EINVAL;
- revert "xen: introduce arch_grant_(un)map_page_identity"

Changes in v3:
- introduce two different  max_nr_dom0/domU_grant_frames parameters;
- x86: introduce more cache maintenance operations;
- reduce the time the grant_table lock is held;
- fix warning message;
- s/EFAULT/EPERM;
- s/llx/PRIx64;
- check offset and size independetly before checking their sum;
- rcu_lock_current_domain cannot fail;
- s/ENOSYS/EOPNOTSUPP;
- use clean_and_invalidate_xen_dcache_va_range to do both operations at
once;
- fold grant_map_exists in this patch;
- support "count" argument;
- make correspondent changes to compat/grant_table.c;
- introduce GNTTAB_CACHE_SOURCE_GREF to select the type of input in the
union;
- rename size field to length;
- make length and offset uint16_t;
- only take spin_lock if d != owner.

Changes in v2:
- make grant_map_exists static;
- remove the spin_lock in grant_map_exists;
- move the hypercall to GNTTABOP;
- do not check for mfn_to_page errors in GNTTABOP_cache_flush;
- take a reference to the page in GNTTABOP_cache_flush;
- replace printk with gdprintk in GNTTABOP_cache_flush;
- split long line in GNTTABOP_cache_flush;
- remove out label in GNTTABOP_cache_flush;
- move rcu_lock_current_domain down before the loop in
GNTTABOP_cache_flush;
- take a spin_lock before calling grant_map_exists in
GNTTABOP_cache_flush.



Stefano Stabellini (7):
      xen: introduce gnttab_max_nr_maptrack_frames command line option
      xen/arm: rename *_xen_dcache_* operations to *_dcache_*
      xen/arm: introduce invalidate_dcache_va_range
      xen/x86: introduce more cache maintenance operations
      xen/arm: introduce GNTTABOP_cache_flush
      Revert "xen/arm: introduce XENFEAT_grant_map_identity"
      Revert "xen: introduce arch_grant_(un)map_page_identity"

 docs/misc/xen-command-line.markdown |    6 ++
 xen/arch/arm/guestcopy.c            |    2 +-
 xen/arch/arm/kernel.c               |    2 +-
 xen/arch/arm/mm.c                   |   24 ++---
 xen/arch/arm/p2m.c                  |   30 +-----
 xen/arch/arm/smpboot.c              |    2 +-
 xen/arch/x86/flushtlb.c             |    6 ++
 xen/common/compat/grant_table.c     |    8 ++
 xen/common/grant_table.c            |  175 ++++++++++++++++++++++++++++-------
 xen/common/kernel.c                 |    2 -
 xen/drivers/passthrough/arm/smmu.c  |   42 +++++++++
 xen/include/asm-arm/arm32/page.h    |    7 +-
 xen/include/asm-arm/arm64/page.h    |    7 +-
 xen/include/asm-arm/grant_table.h   |    3 +-
 xen/include/asm-arm/p2m.h           |    4 -
 xen/include/asm-arm/page.h          |   50 ++++++++--
 xen/include/asm-x86/p2m.h           |    4 -
 xen/include/asm-x86/page.h          |    7 +-
 xen/include/public/features.h       |    4 +-
 xen/include/public/grant_table.h    |   20 ++++
 xen/include/xlat.lst                |    1 +
 21 files changed, 305 insertions(+), 101 deletions(-)

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2014-10-13 11:11 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-10 11:42 [PATCH v4 0/7] xen/arm: introduce GNTTABOP_cache_flush Stefano Stabellini
2014-10-10 11:43 ` [PATCH v4 1/7] xen: introduce gnttab_max_nr_maptrack_frames command line option Stefano Stabellini
2014-10-10 13:08   ` Jan Beulich
2014-10-13  9:59     ` Stefano Stabellini
2014-10-13 10:38       ` Jan Beulich
2014-10-13 10:45         ` Stefano Stabellini
2014-10-10 11:43 ` [PATCH v4 2/7] xen/arm: rename *_xen_dcache_* operations to *_dcache_* Stefano Stabellini
2014-10-10 11:43 ` [PATCH v4 3/7] xen/arm: introduce invalidate_dcache_va_range Stefano Stabellini
2014-10-10 11:43 ` [PATCH v4 4/7] xen/x86: introduce more cache maintenance operations Stefano Stabellini
2014-10-10 13:16   ` Jan Beulich
2014-10-13 10:35     ` Stefano Stabellini
2014-10-13 10:47       ` Jan Beulich
2014-10-13 11:09         ` Stefano Stabellini
2014-10-10 11:43 ` [PATCH v4 5/7] xen/arm: introduce GNTTABOP_cache_flush Stefano Stabellini
2014-10-10 12:04   ` Julien Grall
2014-10-10 13:25   ` Jan Beulich
2014-10-10 11:43 ` [PATCH v4 6/7] Revert "xen/arm: introduce XENFEAT_grant_map_identity" Stefano Stabellini
2014-10-10 11:53   ` Julien Grall
2014-10-10 11:44 ` [PATCH v4 7/7] Revert "xen: introduce arch_grant_(un)map_page_identity" Stefano Stabellini
2014-10-10 11:54   ` Julien Grall

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.