linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] xen/arm: fix "xen_add_mach_to_phys_entry: cannot add" problem
@ 2014-08-01 14:55 Stefano Stabellini
  2014-08-01 14:56 ` [PATCH v3 1/3] xen/arm: introduce XENFEAT_grant_map_identity Stefano Stabellini
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Stefano Stabellini @ 2014-08-01 14:55 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,
Xen support in Linux for ARM and ARM64 suffers from lack of support for
multiple mfn to pfn mappings: whenever a frontend grants the same page
multiple times to the backend, the mfn to pfn accounting in
arch/arm/xen/p2m.c fails. The issue has become critical since v3.15,
when xen-netfront/xen-netback switched from grant copies to grant
mappings, therefore causing the issue to happen much more often.

Fixing the mfn to pfn accounting in p2m.c is difficult and expensive,
therefore we are looking for alternative solutions. One idea is avoiding
mfn to pfn conversions altogether. The only code path that needs them is
swiotlb-xen:unmap_page (and single_for_cpu and single_for_device).

To avoid mfn to pfn conversions we rely on a second p2m mapping done by
Xen (a separate patch series will be sent for Xen). In Linux we use it
to perform the cache maintenance operations without mfns conversions.


The Xen side patch series that introduces XENFEAT_grant_map_identity is:
http://marc.info/?l=xen-devel&m=140690433923855




Changes in v3:
- rename XENFEAT_grant_map_11 to XENFEAT_grant_map_identity.

Changes in v2:
- introduce XENFEAT_grant_map_11;
- remeber the ptep corresponding to scratch pages so that we don't need
to calculate it again every time;
- do not acutally unmap the page on xen_mm32_unmap;
- properly account preempt_enable/disable;
- do not check for mfn in xen_add_phys_to_mach_entry.



Stefano Stabellini (3):
      xen/arm: introduce XENFEAT_grant_map_identity
      xen/arm: reimplement xen_dma_unmap_page & friends
      xen/arm: remove mach_to_phys rbtree

 arch/arm/include/asm/xen/page-coherent.h |   25 ++--
 arch/arm/include/asm/xen/page.h          |    9 --
 arch/arm/xen/Makefile                    |    2 +-
 arch/arm/xen/enlighten.c                 |    6 +
 arch/arm/xen/mm32.c                      |  202 ++++++++++++++++++++++++++++++
 arch/arm/xen/p2m.c                       |   66 +---------
 include/xen/interface/features.h         |    3 +
 7 files changed, 220 insertions(+), 93 deletions(-)
 create mode 100644 arch/arm/xen/mm32.c

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

end of thread, other threads:[~2014-09-12  9:43 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-01 14:55 [PATCH v3 0/3] xen/arm: fix "xen_add_mach_to_phys_entry: cannot add" problem Stefano Stabellini
2014-08-01 14:56 ` [PATCH v3 1/3] xen/arm: introduce XENFEAT_grant_map_identity Stefano Stabellini
2014-08-01 15:17   ` David Vrabel
2014-08-01 16:53   ` [Xen-devel] " Julien Grall
2014-08-01 17:09     ` Stefano Stabellini
2014-08-01 14:56 ` [PATCH v3 2/3] xen/arm: reimplement xen_dma_unmap_page & friends Stefano Stabellini
2014-08-08 14:32   ` Stefano Stabellini
2014-08-08 14:38     ` Wei Liu
2014-08-08 14:49       ` Thomas Leonard
2014-08-08 14:54         ` Stefano Stabellini
2014-08-08 15:00         ` Wei Liu
2014-08-08 16:01           ` Thomas Leonard
2014-08-08 16:12             ` Wei Liu
2014-08-08 16:52             ` Stefano Stabellini
2014-08-01 14:56 ` [PATCH v3 3/3] xen/arm: remove mach_to_phys rbtree Stefano Stabellini
2014-08-01 15:28 ` [PATCH v3 0/3] xen/arm: fix "xen_add_mach_to_phys_entry: cannot add" problem David Vrabel
2014-08-01 16:27   ` Stefano Stabellini
2014-09-10 23:28   ` Stefano Stabellini
2014-09-11 12:55     ` David Vrabel
2014-09-11 18:31       ` Stefano Stabellini
2014-09-12  9:43         ` David Vrabel

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).