Skip to content

xen: arm: map normal memory as inner shareable, reduce scope of various barriers

Ian Campbell xen-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest8 patches 7 repliesIn review
  2. v28 patches 0 repliesSuperseded
  3. v110 patches 32 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8xen: arm: map memory as inner shareable.xen/arch/arm/arm32/head.S xen/arch/arm/arm64/head.S xen/arch/arm/mm.c +2 more+77 -287 replies
2/8xen: arm: Only upgrade guest barriers to inner shareable.xen/arch/arm/traps.c+1 -10 replies
3/8xen: arm: consolidate barrier definitionsxen/include/asm-arm/arm32/system.h xen/include/asm-arm/arm64/system.h xen/include/asm-arm/system.h+16 -330 replies
4/8xen: arm: Use SMP barriers when that is all which is required.xen/arch/arm/mm.c xen/arch/arm/smpboot.c+6 -60 replies
5/8xen: arm: Use dmb for smp barriersxen/include/asm-arm/system.h+4 -40 replies
6/8xen: arm: add scope to dsb and dmb macrosxen/arch/arm/domain.c xen/arch/arm/gic.c xen/arch/arm/platforms/vexpress.c +8 more+36 -360 replies
7/8xen: arm: weaken SMP barriers to inner shareable.xen/include/asm-arm/system.h+3 -30 replies
8/8xen: arm: use more specific barriers for read and write barriers.xen/include/asm-arm/system.h+13 -40 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchTim DeeganStefano StabelliniJulien Grall
1/8A-b A-b
2/8A-b A-b
3/8A-b A-b
4/8A-b
5/8A-b A-b
6/8A-b A-b
7/8A-b A-b
8/8A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/8] xen: arm: map normal memory as inner shareable, reduce scope of various barriers

Currently Xen maps all RAM as Outer-Shareable, since that seemed like the most conservative option early on when we didn't really know what Inner- vs. Outer-Shareable meant. However we have long suspected that actually Inner-Shareable would be the correct type to use.

After reading the docs many times, getting more confused each time, I finally got a reasonable explanation from a man (and a dog) down the
pub: Inner-Shareable == the processors in an SMP system, while Outer-Shareable == devices. (NB: Not a random man, he knew what he was talking about...). With that in mind switch all of Xen's memory mapping, page table walks and an appropriate subset of the barriers to be inner shareable.

In addition I have switched barriers to use the correct read/write/any variants for their types. Note that I have only tackled the generic mb/rmb/wmb and smp_* barriers (mainly used by common code) here. There are also quite a few open-coded full-system dsb's in the arch code which I will look at another time.

Since v2 I have just rebased onto current staging. All except the first patch have an ack attached already.

Ian.