mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] xen: use X86_FEATURE_XENPV for PV specific code
@ 2025-08-26 14:56 Juergen Gross
  2025-08-26 14:56 ` [PATCH 1/3] xen: rework xen_pv_domain() Juergen Gross
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Juergen Gross @ 2025-08-26 14:56 UTC (permalink / raw)
  To: linux-kernel, x86
  Cc: Juergen Gross, Boris Ostrovsky, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, H. Peter Anvin, Stefano Stabellini,
	Oleksandr Tyshchenko, xen-devel

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

-- 
2.43.0


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

end of thread, other threads:[~2025-08-27 14:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-26 14:56 [PATCH 0/3] xen: use X86_FEATURE_XENPV for PV specific code Juergen Gross
2025-08-26 14:56 ` [PATCH 1/3] xen: rework xen_pv_domain() Juergen Gross
2025-08-27 13:59   ` Jason Andryuk
2025-08-26 14:56 ` [PATCH 2/3] xen: replace XENFEAT_auto_translated_physmap with xen_pv_domain() Juergen Gross
2025-08-27 14:00   ` Jason Andryuk
2025-08-26 14:56 ` [PATCH 3/3] drivers/xen/gntdev: use xen_pv_domain() instead of cached value Juergen Gross
2025-08-27 14:01   ` Jason Andryuk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®