Skip to content

RFC Xen i386 paravirtualization support

Chris Wright lkml netdev xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest35 patches 149 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/35Add XEN config options and disable unsupported config options.arch/i386/Kconfig arch/i386/Kconfig.debug drivers/xen/Kconfig +2 more+39 -611 replies
2/35Makefile support to build Xen subarcharch/i386/Makefile arch/i386/mach-xen/Makefile+12 -00 replies
3/35Add Xen interface header filesinclude/xen/interface/arch-x86_32.h include/xen/interface/event_channel.h include/xen/interface/features.h +13 more+2312 -013 replies
4/35Hypervisor interface header files.include/asm-i386/hypercall.h include/asm-i386/hypervisor.h+379 -02 replies
5/35Add sync bitopsinclude/asm-i386/synch_bitops.h include/asm-i386/system.h+199 -03 replies
6/35Add vmlinuz build target.arch/i386/Makefile arch/i386/boot/Makefile+12 -30 replies
7/35Make LOAD_OFFSET defined by subarcharch/i386/kernel/vmlinux.lds.S include/asm-i386/mach-default/mach_vmlinux.lds.h include/asm-i386/mach-xen/mach_vmlinux.lds.h+13 -17 replies
8/35Add Xen-specific memory management definitionsinclude/asm-i386/hypervisor.h include/asm-i386/mach-default/mach_page.h include/asm-i386/mach-xen/mach_page.h +1 more+108 -07 replies
9/35Change __FIXADDR_TOP to leave room for the hypervisor.include/asm-i386/fixmap.h include/asm-i386/mach-default/mach_fixmap.h include/asm-i386/mach-xen/mach_fixmap.h+23 -70 replies
10/35Add a new head.S start-of-day file for booting on Xen.arch/i386/Makefile arch/i386/kernel/head-cpu.S arch/i386/kernel/head.S +2 more+222 -660 replies
11/35Add support for Xen to entry.S.arch/i386/kernel/entry.S+120 -171 reply
12/35Add start-of-day setup hooks to subarcharch/i386/kernel/setup.c include/asm-i386/hypervisor.h include/asm-i386/mach-default/mach_setup.h +4 more+121 -30 replies
13/35Support loading an initrd when running on Xenarch/i386/kernel/setup.c include/asm-i386/mach-xen/setup_arch_post.h+9 -10 replies
14/35Subarch support for CPUID instructionarch/i386/kernel/head-cpu.S include/asm-i386/mach-default/mach_processor.h include/asm-i386/mach-xen/mach_processor.h +1 more+25 -80 replies
15/35subarch support for controlling interrupt deliveryinclude/asm-i386/mach-default/mach_system.h include/asm-i386/mach-xen/mach_system.h include/asm-i386/system.h+128 -1912 replies
16/35subarch support for interrupt and exception gatesarch/i386/kernel/traps.c include/asm-i386/mach-default/mach_idt.h include/asm-i386/mach-xen/mach_idt.h +1 more+105 -484 replies
17/35Segment register changes for Xenarch/i386/kernel/process.c arch/i386/mm/fault.c include/asm-i386/mach-default/mach_segment.h +6 more+37 -610 replies
18/35Support gdt/idt/ldt handling on Xen.include/asm-i386/desc.h include/asm-i386/mach-default/mach_desc.h include/asm-i386/mach-xen/mach_desc.h+141 -605 replies
19/35subarch support for control register accessesinclude/asm-i386/mach-default/mach_system.h include/asm-i386/mach-xen/mach_system.h include/asm-i386/system.h+111 -580 replies
20/35subarch stack pointer updateinclude/asm-i386/mach-default/mach_processor.h include/asm-i386/mach-xen/mach_processor.h include/asm-i386/processor.h+16 -00 replies
21/35subarch TLB supportinclude/asm-i386/mach-default/mach_tlbflush.h include/asm-i386/mach-xen/mach_tlbflush.h include/asm-i386/tlbflush.h+85 -540 replies
22/35subarch suport for idle loop (NO_IDLE_HZ for Xen)drivers/xen/Kconfig include/asm-i386/mach-xen/setup_arch_post.h+32 -02 replies
23/35Increase x86 interrupt vector rangearch/i386/kernel/entry.S arch/i386/kernel/irq.c arch/x86_64/kernel/entry.S +3 more+10 -100 replies
24/35Add support for Xen event channels.arch/i386/kernel/Makefile drivers/xen/core/evtchn.c include/asm-i386/hw_irq.h +2 more+1120 -23 replies
25/35Add Xen time abstractionsarch/i386/kernel/Makefile drivers/xen/core/time.c+1050 -18 replies
26/35Add Xen subarch reboot supportarch/i386/kernel/Makefile drivers/xen/core/reboot.c+233 -03 replies
27/35Add nosegneg capability to the vsyscall page notesarch/i386/kernel/vsyscall-note.S+29 -00 replies
28/35add support for Xen feature queriesdrivers/Makefile drivers/xen/Makefile drivers/xen/core/Makefile +3 more+58 -01 reply
29/35Add the Xen virtual console driver.drivers/char/tty_io.c drivers/xen/Makefile drivers/xen/console/Makefile +3 more+801 -16 replies
30/35Add apply_to_page_range() functioninclude/linux/mm.h mm/memory.c+99 -00 replies
31/35Add Xen grant table supportdrivers/xen/core/Makefile drivers/xen/core/gnttab.c include/xen/gnttab.h+528 -10 replies
32/35Add Xen driver utility functions.drivers/xen/Makefile drivers/xen/util.c include/xen/driver_util.h+88 -02 replies
33/35Add the Xenbus sysfs and virtual device hotplug driver.drivers/xen/Makefile drivers/xen/xenbus/Makefile drivers/xen/xenbus/xenbus_client.c +5 more+2839 -010 replies
34/35Add the Xen virtual network device driver.drivers/net/Kconfig drivers/xen/Kconfig.net drivers/xen/Makefile +4 more+1639 -030 replies
35/35Add Xen virtual block device driver.drivers/block/Kconfig drivers/xen/Kconfig.blk drivers/xen/Makefile +4 more+1207 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 00/35] Xen i386 paravirtualization support

Unlike full virtualization in which the virtual machine provides the same platform interface as running natively on the hardware, paravirtualization requires modification to the guest operating system to work with the platform interface provided by the hypervisor.

Xen was designed with performance in mind. Calls to the hypervisor are minimized, batched if necessary, and non-critical codepaths are left unmodified in the case where the privileged instruction can be trapped and emulated by the hypervisor. The Xen API is designed to be OS agnostic and has had Linux, NetBSD, FreeBSD, Solaris, Plan9 and Netware ported to it. Xen also provides support for running directly on native hardware.

The following patch series provides the minimal support required to launch Xen paravirtual guests on standard x86 hardware running the Xen hypervisor. These patches effectively port the Linux kernel to run on the platform interface provided by Xen. This port is done as an i386 subarch. In the future, we will break this patchset up to place the general infrastrcture and subarch bits that may have common users at the beginning of the series, ripe for picking off and pushing upstream.

With these patches you will be able to launch an unprivileged guest running the modified Linux kernel and unmodified userspace. This guest is x86, UP only, runs in shadow translated mode, and has no direct access to hardware. This simplifies the patchset to the minimum functionality needed to support a paravirtualized guest. It's worth noting that a fair amount of this patchset deals with paravirtualizing I/O, not just CPU-only. The additional missing functionality is primarily about full SMP support, optimizations such as direct writable page tables, and the management interface.

At a high-level, the patches provide the following:

- Kconfig and Makefile changes required to support Xen
- subarch changes to allow more platform functionality to be implemented by an i386 subarch
- Xen subarch implementation
- start of day code for running in the hypervisor provided environment (paging enabled)
- basic Xen drivers to provide a fully functional guest

The Xen platform API encapsulates the following types of requirements:

- idt, gdt, ldt (descriptor table handling)
- cr2, fpu_taskswitch, debug registers (privileged register handling)
- mmu (page table, tlb, and cache handling)
- memory reservations
- time and timer
- vcpu (init, up/down vcpu)
- schedule (processor yield, shutdown, etc)
- event channel (generalized virtual interrupt handling)
- grant table (shared memory interface for high speed interdomain communication)
- block device I/O
- network device I/O
- console device I/O
- Xen feature map
- Xen version info

Thanks to all have reviewed earlier versions of these patches. -chris
--