Skip to content

xen: use X86_FEATURE_XENPV for PV specific code

Juergen Gross lkml xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3xen: rework xen_pv_domain()arch/x86/xen/enlighten_pv.c include/xen/xen.h+9 -21 reply
2/3xen: replace XENFEAT_auto_translated_physmap with xen_pv_domain()arch/x86/include/asm/xen/page.h arch/x86/xen/mmu.c arch/x86/xen/p2m.c +9 more+33 -341 reply
3/3drivers/xen/gntdev: use xen_pv_domain() instead of cached valuedrivers/xen/gntdev-dmabuf.c drivers/xen/gntdev-dmabuf.h drivers/xen/gntdev.c+18 -241 reply

Reviews trailers per patch

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

PatchJason Andryuk
1/3R-b
2/3R-b
3/3R-b

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

Read the v1 thread

Cover letter [PATCH 0/3] xen: use X86_FEATURE_XENPV for PV specific code

Instead of using a global variable with the current guest type or the XENFEAT_auto_translated_physmap Xen feature, use the already existing X86_FEATURE_XENPV for guarding PV mode specific code.

This has the advantage of compile time code elimination in case of the kernel having been configured without CONFIG_XEN_PV, and the usage of static-keys for selecting the correct code path otherwise.

Juergen Gross (3):
xen: rework xen_pv_domain()
xen: replace XENFEAT_auto_translated_physmap with xen_pv_domain() drivers/xen/gntdev: use xen_pv_domain() instead of cached value

 arch/x86/include/asm/xen/page.h    | 14 ++++++-------
 arch/x86/xen/enlighten_pv.c        |  2 +-
 arch/x86/xen/mmu.c                 |  2 +-
 arch/x86/xen/p2m.c                 |  4 ++--
 drivers/xen/balloon.c              |  4 ++--
 drivers/xen/gntdev-dmabuf.c        |  7 +++----
 drivers/xen/gntdev-dmabuf.h        |  2 +-
 drivers/xen/gntdev.c               | 33 +++++++++++++-----------------
 drivers/xen/grant-table.c          |  6 +++---
 drivers/xen/privcmd.c              | 14 ++++++-------
 drivers/xen/unpopulated-alloc.c    |  4 ++--
 drivers/xen/xenbus/xenbus_client.c |  2 +-
 include/xen/grant_table.h          |  4 ++--
 include/xen/mem-reservation.h      |  4 ++--
 include/xen/xen-ops.h              |  7 ++++---
 include/xen/xen.h                  |  9 +++++++-
 16 files changed, 59 insertions(+), 59 deletions(-)
Signature · 1 line
2.43.0