Skip to content

Cleanup low-level arch code

Alexander Gordeev kvm 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest12 patches 21 repliesIn review
  2. v711 patches 4 repliesSuperseded
  3. v611 patches 9 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v511 patches5 repliesSuperseded
v412 patches6 repliesSuperseded
v310 patches11 repliesSuperseded
v29 patches18 repliesSuperseded
v19 patches7 repliesSuperseded

Changes in v8 from the cover letter

- PT_NX_MASK macro renamed to PT64_NX_MASK;
- added patch "io: Unify IO accessors across architectures";

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12Remove unused and unnecessary PHYS32 macrolib/alloc.h+0 -40 replies
2/12Move phys_addr_t type definition to lib/libcflat.harm/selftest.c lib/alloc.h lib/arm/asm/page.h +2 more+2 -50 replies
3/12x86: Introduce lib/x86/asm/page.hlib/x86/asm/page.h lib/x86/vm.c lib/x86/vm.h+34 -300 replies
4/12x86: Introduce lib/x86/asm/io.hlib/x86/asm/io.h lib/x86/asm/pci.h lib/x86/io.c +12 more+56 -660 replies
5/12x86: Introduce lib/x86/asm/barrier.hlib/x86/asm/barrier.h lib/x86/smp.h x86/hyperv_stimer.c +1 more+15 -40 replies
6/12io: Separate overrides of virt_to_phys() and phys_to_virt()lib/asm-generic/io.h+2 -00 replies
7/12io: Disallow memory re-ordering for generic memory barrierslib/asm-generic/io.h+5 -20 replies
8/12x86: Cleanup PAGE_* constantslib/x86/asm/page.h x86/access.c x86/vmx.h+11 -55 replies
9/12x86: Cleanup PT_*_MASK flagslib/x86/asm/page.h lib/x86/vm.c x86/access.c +7 more+35 -390 replies
10/12io: Make ioremap() prototype conform to Linux onelib/asm-generic/io.h lib/ppc64/asm/io.h lib/x86/asm/io.h+6 -20 replies
11/12x86: io: Factor out ioremap()lib/x86/asm/io.h lib/x86/io.c x86/vmexit.c+20 -80 replies
12/12io: Unify IO accessors across architectureslib/asm-generic/barrier.h lib/asm-generic/io.h lib/ppc64/asm/barrier.h +1 more+91 -2225 replies

Reviews trailers per patch

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

PatchAndrew Jones
1/12R-b
2/12R-b
3/12R-b
4/12R-b
5/12R-b
6/12R-b
7/12R-b
8/12R-b
9/12R-b
10/12R-b
11/12R-b
12/12R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [kvm-unit-tests PATCH v8 00/12] Cleanup low-level arch code

Hi all,

This is 8th attempt to make mainly x86 arch code consistent with other architectures. This series is a prerequisite for a follow-up "PCI bus support" series which I am going to send separately.

Changes since v7:
- PT_NX_MASK macro renamed to PT64_NX_MASK;
- added patch "io: Unify IO accessors across architectures";

Changes since v6:
- ioremap() PCD comment updated;
- PT_PSE_MASK renamed to PT_PAGE_SIZE_MASK;
- GENMASK_ULL used for PT_ADDR_MASK definition;
- missed x86/taskswitch2.c update added;

Changes since v5:
- ioremap() PCD comment added, the Reviewed-by preserved;
- page table flag names changed from PTE_* to PT_*_MASK;

Changes since v4:
- single instead of multiple pages allocation bug fixed in x86 ioremap();
- style fixes squashed into code movements for lib/x86/asm/page.h and

    lib/x86/asm/barrier.h;

- #ifndef __ASSEMBLY__ added to lib/x86/asm/page.h;

Changes since v3:
- x86 PAGE_* constants and PTE_* flags cleaned up;
- missing Reviewed-bys restored;
- missing headers to lib/x86/asm/page.h and lib/x86/asm/barriers.h added

    (I did not remove already given Reviewed-bys from these);

Changes since v2:
- x86 ioremap() address arithmetics nonsense fixed;
- x86 virt_to_phys() and phys_to_virt() implementations left intact;
- separate overrides of virt_to_phys() and phys_to_virt() added;
- unsigned long size specifier removed from PAGE_SIZE constant;

Changes since v1:
- arm compilation error fixed;
- disabling memory re-ordering for generic memory barriers added;

Cc Andrew Jones <[email protected]>
Cc Thomas Huth <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Radim Krčmář <[email protected]>

Alexander Gordeev (12):
Remove unused and unnecessary PHYS32 macro
Move phys_addr_t type definition to lib/libcflat.h
x86: Introduce lib/x86/asm/page.h
x86: Introduce lib/x86/asm/io.h
x86: Introduce lib/x86/asm/barrier.h
io: Separate overrides of virt_to_phys() and phys_to_virt()
io: Disallow memory re-ordering for generic memory barriers
x86: Cleanup PAGE_* constants
x86: Cleanup PT_*_MASK flags
io: Make ioremap() prototype conform to Linux one
x86: io: Factor out ioremap()
io: Unify IO accessors across architectures

 arm/selftest.c            |  1 -
 lib/alloc.h               |  5 ----
 lib/arm/asm/page.h        |  2 --
 lib/asm-generic/barrier.h | 21 +++++++++++++++
 lib/asm-generic/io.h      | 56 +++++++++++++++++++++++++++++++++-------
 lib/libcflat.h            |  2 ++
 lib/powerpc/asm/setup.h   |  1 -
 lib/ppc64/asm/barrier.h   |  4 +++
 lib/ppc64/asm/io.h        |  2 ++
 lib/x86/asm/barrier.h     | 13 ++++++++++
 lib/x86/asm/io.h          | 65 +++++++++++++++++++++++++++++++++++++++++++++++
 lib/x86/asm/page.h        | 45 ++++++++++++++++++++++++++++++++
 lib/x86/asm/pci.h         |  2 +-
 lib/x86/io.c              | 18 ++++++++++++-
 lib/x86/io.h              | 40 -----------------------------
 lib/x86/smp.h             |  4 ---
 lib/x86/vm.c              | 37 ++++++++-------------------
 lib/x86/vm.h              | 25 ++----------------
 x86/access.c              | 18 +++----------
 x86/asyncpf.c             |  2 +-
 x86/eventinj.c            | 17 +++++--------
 x86/hypercall.c           |  2 +-
 x86/hyperv.c              |  1 +
 x86/hyperv.h              |  1 -
 x86/hyperv_stimer.c       |  2 +-
 x86/hyperv_synic.c        |  1 -
 x86/init.c                |  2 +-
 x86/kvmclock.c            |  1 +
 x86/pku.c                 |  2 +-
 x86/rmap_chain.c          |  2 +-
 x86/smap.c                |  6 ++---
 x86/svm.c                 |  1 -
 x86/taskswitch2.c         |  2 +-
 x86/vmexit.c              | 11 ++------
 x86/vmx.c                 |  1 -
 x86/vmx.h                 |  2 +-
 x86/vmx_tests.c           |  1 -
 37 files changed, 254 insertions(+), 164 deletions(-)
 create mode 100644 lib/asm-generic/barrier.h
 create mode 100644 lib/ppc64/asm/barrier.h
 create mode 100644 lib/x86/asm/barrier.h
 create mode 100644 lib/x86/asm/io.h
 create mode 100644 lib/x86/asm/page.h
 delete mode 100644 lib/x86/io.h

--
1.8.3.1