xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH KERNEL 0/4] x86/xen: untangle PV and PVHVM guest support code
@ 2016-11-14 17:17 Vitaly Kuznetsov
  2016-11-14 17:17 ` [RFC PATCH KERNEL 1/4] x86/xen: start untangling " Vitaly Kuznetsov
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Vitaly Kuznetsov @ 2016-11-14 17:17 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, Boris Ostrovsky, x86, Andrew Jones, David Vrabel

Hi,

I have a long-standing idea to separate PV and PVHVM code in kernel and 
introduce Kconfig options to make it possible to enable the required
parts only breaking the current 'all or nothing' approach.

Motivation:
- Xen related x86 code in kernel is rather big and it is unclear which
  parts of it are required for PV, for HVM or for both. With PVH coming
  into picture is becomes even more tangled. It makes it hard to
  understand/audit the code.

- In some case we may want to avoid bloating kernel by supporting Xen
  guests we don't need. In particular, 90% of the code in arch/x86/xen/ is
  required to support PV guests and one may require PVHVM support only.

- PV guests are supposed to go away one day and such code separation would
  help us to get ready.

This RFC adds XEN_PV Kconfig option and makes it possible to build PV-only
and PVHVM-only kernels. It also makes it possible to disable Dom0 support.
The series is incomplete and probably dirty in some places, I didn't pay
much attention to the current PVH implementation as (as far as I
understand) it is supposed to be replaced with PVHv2 but before investing
more I'd like to get opinions whether such refactoring will be welcomed.

Patches are rather big but this is mostly just moving code around, no
functional changes intended. I smoke tested it with PV-only and PVHVM-only
builds.

Vitaly Kuznetsov (4):
  x86/xen: start untangling PV and PVHVM guest support code
  x86/xen: split smp.c for PV and PVHVM guests
  x86/xen: put setup.c, mmu.c and p2m.c under CONFIG_XEN_PV
  x86/xen: put setup.c, pmu.c and apic.c under CONFIG_XEN_PV

 arch/x86/include/asm/hypervisor.h |   3 +-
 arch/x86/include/asm/xen/page.h   |  44 ++++-
 arch/x86/kernel/cpu/hypervisor.c  |   7 +-
 arch/x86/kernel/process_64.c      |   2 +-
 arch/x86/xen/Kconfig              |  35 +++-
 arch/x86/xen/Makefile             |  14 +-
 arch/x86/xen/enlighten.c          | 396 +++-----------------------------------
 arch/x86/xen/enlighten_common.c   | 216 +++++++++++++++++++++
 arch/x86/xen/enlighten_hvm.c      | 202 +++++++++++++++++++
 arch/x86/xen/mmu.c                | 286 +--------------------------
 arch/x86/xen/mmu_common.c         | 219 +++++++++++++++++++++
 arch/x86/xen/mmu_hvm.c            |  77 ++++++++
 arch/x86/xen/pmu.h                |   5 +
 arch/x86/xen/smp.c                | 301 +++--------------------------
 arch/x86/xen/smp.h                |  23 +++
 arch/x86/xen/smp_common.c         | 246 +++++++++++++++++++++++
 arch/x86/xen/smp_hvm.c            |  54 ++++++
 arch/x86/xen/suspend.c            |   4 +
 arch/x86/xen/xen-head.S           |   4 +
 arch/x86/xen/xen-ops.h            |   2 +
 drivers/xen/balloon.c             |  30 ++-
 include/xen/xen-ops.h             |  20 ++
 22 files changed, 1230 insertions(+), 960 deletions(-)
 create mode 100644 arch/x86/xen/enlighten_common.c
 create mode 100644 arch/x86/xen/enlighten_hvm.c
 create mode 100644 arch/x86/xen/mmu_common.c
 create mode 100644 arch/x86/xen/mmu_hvm.c
 create mode 100644 arch/x86/xen/smp_common.c
 create mode 100644 arch/x86/xen/smp_hvm.c

-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

end of thread, other threads:[~2016-11-15 15:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-14 17:17 [RFC PATCH KERNEL 0/4] x86/xen: untangle PV and PVHVM guest support code Vitaly Kuznetsov
2016-11-14 17:17 ` [RFC PATCH KERNEL 1/4] x86/xen: start untangling " Vitaly Kuznetsov
2016-11-15 11:26   ` David Vrabel
2016-11-15 12:08     ` Vitaly Kuznetsov
2016-11-15 15:50   ` Boris Ostrovsky
2016-11-14 17:17 ` [RFC PATCH KERNEL 2/4] x86/xen: split smp.c for PV and PVHVM guests Vitaly Kuznetsov
2016-11-14 17:17 ` [RFC PATCH KERNEL 3/4] x86/xen: put setup.c, mmu.c and p2m.c under CONFIG_XEN_PV Vitaly Kuznetsov
2016-11-14 17:17 ` [RFC PATCH KERNEL 4/4] x86/xen: put setup.c, pmu.c and apic.c " Vitaly Kuznetsov
2016-11-14 18:21 ` [RFC PATCH KERNEL 0/4] x86/xen: untangle PV and PVHVM guest support code David Vrabel
2016-11-14 18:47   ` Boris Ostrovsky
2016-11-15 11:14     ` Vitaly Kuznetsov

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