From: Wei Liu <wei.liu2@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Wei Liu <wei.liu2@citrix.com>
Subject: [PATCH v3 00/16] Make CONFIG_HVM work
Date: Tue, 4 Sep 2018 17:15:17 +0100 [thread overview]
Message-ID: <20180904161533.11575-1-wei.liu2@citrix.com> (raw)
This series goes through x86 code to make CONFIG_HVM work.
With this series, it is possible to build Xen with PV support only.
Running `xl info` on a host with PV only Xen:
root@lcy2-dt108:~# xl info
host : lcy2-dt108
release : 4.17.0-0.bpo.1-amd64
version : #1 SMP Debian 4.17.8-1~bpo9+1 (2018-07-23)
machine : x86_64
nr_cpus : 8
max_cpu_id : 7
nr_nodes : 1
cores_per_socket : 4
threads_per_core : 2
cpu_mhz : 3504.241
hw_caps : bfebfbff:77faf3ff:2c100800:00000121:0000000f:009c6fbf:00000000:00000100
virt_caps : directio
total_memory : 32589
free_memory : 1033
sharing_freed_memory : 0
sharing_used_memory : 0
outstanding_claims : 0
free_cpus : 0
xen_major : 4
xen_minor : 12
xen_extra : -unstable
xen_version : 4.12-unstable
xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p
xen_scheduler : credit
xen_pagesize : 4096
platform_params : virt_start=0xffff800000000000
xen_changeset : Fri Aug 24 21:01:40 2018 +0100 git:5036cad847
xen_commandline : placeholder loglvl=all guest_loglvl=all com2=115200,8n1 ucode=scan console=com2,vga console_to_ring sync_console hvm_fep
cc_compiler : gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
cc_compile_by : wei
cc_compile_domain : uk.xensource.com
cc_compile_date : Tue Sep 4 16:51:04 BST 2018
build_id : a3ba77ce4d5117ef0176df6c0e336bacf6c39437
The major goal at the moment is to get something that works first,
then refine code structure later. Currently CONFIG_HVM is littered in
individual files. In the future some of the code could / should be
moved to files under hvm/ for cleaner split.
I ran some basic PV / PVSHIM VM life cycle tests and XTF PV tests, all
worked.
Baseline:
$ ls -l xen # default build, non-debug
-rwxrwxr-x 1 wei wei 2379388 Aug 17 15:39 xen
$ ls -l xen # PV only, non-debug
-rwxrwxr-x 1 wei wei 1912380 Sep 4 17:00 xen
The PV only Xen is ~19.6% smaller in size.
Wei.
Wei Liu (16):
x86: change name of parameter for various invlpg functions
x86: introduce and use a set of internal emulation flags
x86: XENMEM_resource_ioreq_server is HVM only
x86: monitor.o is currently HVM only
x86: PIT emulation is common to both PV and HVM
libxl: don't set PoD target for PV guests
x86/p2m/pod: make it build with !CONFIG_HVM
x86/hvm: rearrange content of hvm.h
x86: provide stubs, declarations and macros in hvm.h
x86/mm: put nested p2m code under CONFIG_HVM
x86/mm: put HVM only code under CONFIG_HVM
x86/mm: put paging_update_nestedmode under CONFIG_HVM
xen: connect guest creation with CONFIG_{HVM,PV}
x86: expose CONFIG_HVM
x86/pvshim: disable HVM for PV shim
xen: decouple HVM and IOMMU capabilities
tools/firmware/xen-dir/shim.config | 2 +-
tools/libxl/libxl.c | 5 +-
tools/libxl/libxl.h | 6 +
tools/libxl/libxl_mem.c | 22 +--
tools/libxl/libxl_types.idl | 1 +
tools/xl/xl_info.c | 5 +-
xen/arch/x86/Kconfig | 11 ++
xen/arch/x86/Makefile | 3 +-
xen/arch/x86/domain.c | 19 ++-
xen/arch/x86/{hvm/i8254.c => emul-i8254.c} | 18 +-
xen/arch/x86/hvm/Makefile | 1 -
xen/arch/x86/hvm/ioreq.c | 5 +-
xen/arch/x86/hvm/svm/svm.c | 14 +-
xen/arch/x86/hvm/vmx/vmx.c | 12 +-
xen/arch/x86/mm.c | 17 +-
xen/arch/x86/mm/Makefile | 11 +-
xen/arch/x86/mm/hap/hap.c | 2 +-
xen/arch/x86/mm/mem_access.c | 18 +-
xen/arch/x86/mm/mem_sharing.c | 2 +
xen/arch/x86/mm/p2m-pt.c | 4 +
xen/arch/x86/mm/p2m.c | 53 ++++--
xen/arch/x86/mm/paging.c | 2 +
xen/arch/x86/mm/shadow/multi.c | 14 +-
xen/arch/x86/mm/shadow/none.c | 2 +-
xen/arch/x86/sysctl.c | 2 +-
xen/common/domain.c | 15 ++
xen/common/memory.c | 3 +-
xen/common/vm_event.c | 6 +
xen/include/asm-x86/altp2m.h | 13 +-
xen/include/asm-x86/domain.h | 59 +++++--
xen/include/asm-x86/hvm/domain.h | 4 +
xen/include/asm-x86/hvm/hvm.h | 262 ++++++++++++++++++++---------
xen/include/asm-x86/hvm/svm/asid.h | 4 +-
xen/include/asm-x86/hvm/svm/svm.h | 4 +-
xen/include/asm-x86/monitor.h | 13 ++
xen/include/asm-x86/p2m.h | 47 +++++-
xen/include/asm-x86/paging.h | 3 +-
xen/include/public/sysctl.h | 8 +-
38 files changed, 504 insertions(+), 188 deletions(-)
rename xen/arch/x86/{hvm/i8254.c => emul-i8254.c} (97%)
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next reply other threads:[~2018-09-04 16:15 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-04 16:15 Wei Liu [this message]
2018-09-04 16:15 ` [PATCH v3 01/16] x86: change name of parameter for various invlpg functions Wei Liu
2018-09-06 11:12 ` George Dunlap
2018-09-13 16:11 ` George Dunlap
2018-09-04 16:15 ` [PATCH v3 02/16] x86: introduce and use a set of internal emulation flags Wei Liu
2018-09-06 13:27 ` Jan Beulich
2018-09-06 13:47 ` Wei Liu
2018-09-04 16:15 ` [PATCH v3 03/16] x86: XENMEM_resource_ioreq_server is HVM only Wei Liu
2018-09-04 16:24 ` Paul Durrant
2018-09-04 16:42 ` Wei Liu
2018-09-06 13:29 ` Jan Beulich
2018-09-04 16:15 ` [PATCH v3 04/16] x86: monitor.o is currently " Wei Liu
2018-09-04 16:35 ` Razvan Cojocaru
2018-09-04 16:15 ` [PATCH v3 05/16] x86: PIT emulation is common to both PV and HVM Wei Liu
2018-09-06 14:26 ` Jan Beulich
2018-09-04 16:15 ` [PATCH v3 06/16] libxl: don't set PoD target for PV guests Wei Liu
2018-09-07 13:44 ` Ian Jackson
2018-09-04 16:15 ` [PATCH v3 07/16] x86/p2m/pod: make it build with !CONFIG_HVM Wei Liu
2018-09-04 17:08 ` Razvan Cojocaru
2018-09-04 17:10 ` Razvan Cojocaru
2018-09-04 17:24 ` Julien Grall
2018-09-06 10:57 ` Wei Liu
2018-09-06 15:30 ` George Dunlap
2018-09-06 15:05 ` Jan Beulich
2018-09-06 16:06 ` George Dunlap
2018-09-04 16:15 ` [PATCH v3 08/16] x86/hvm: rearrange content of hvm.h Wei Liu
2018-09-07 6:52 ` Jan Beulich
2018-09-04 16:15 ` [PATCH v3 09/16] x86: provide stubs, declarations and macros in hvm.h Wei Liu
2018-09-07 7:02 ` Jan Beulich
2018-09-13 15:31 ` Wei Liu
2018-09-04 16:15 ` [PATCH v3 10/16] x86/mm: put nested p2m code under CONFIG_HVM Wei Liu
2018-09-06 16:20 ` George Dunlap
2018-09-13 15:46 ` Wei Liu
2018-09-13 16:01 ` George Dunlap
2018-09-07 7:06 ` Jan Beulich
2018-09-13 15:07 ` Wei Liu
2018-09-14 8:01 ` Jan Beulich
2018-09-04 16:15 ` [PATCH v3 11/16] x86/mm: put HVM only " Wei Liu
2018-09-04 17:10 ` Razvan Cojocaru
2018-09-07 7:12 ` Jan Beulich
2018-09-07 21:27 ` Tamas K Lengyel
2018-09-13 15:43 ` Wei Liu
2018-09-13 16:31 ` Tamas K Lengyel
2018-09-04 16:15 ` [PATCH v3 12/16] x86/mm: put paging_update_nestedmode " Wei Liu
2018-09-13 16:39 ` George Dunlap
2018-09-04 16:15 ` [PATCH v3 13/16] xen: connect guest creation with CONFIG_{HVM, PV} Wei Liu
2018-09-04 16:15 ` [PATCH v3 14/16] x86: expose CONFIG_HVM Wei Liu
2018-09-07 7:15 ` Jan Beulich
2018-09-13 16:01 ` Wei Liu
2018-09-14 8:07 ` Jan Beulich
2018-09-14 10:36 ` Wei Liu
2018-09-04 16:15 ` [PATCH v3 15/16] x86/pvshim: disable HVM for PV shim Wei Liu
2018-09-07 7:18 ` Jan Beulich
2018-09-07 7:46 ` Wei Liu
2018-09-07 7:48 ` Wei Liu
2018-09-04 16:15 ` [PATCH v3 16/16] xen: decouple HVM and IOMMU capabilities Wei Liu
2018-09-13 15:52 ` Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180904161533.11575-1-wei.liu2@citrix.com \
--to=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).