Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [bouyer-xenpvh] src/sys/arch

Module Name:    src
Committed By:   bouyer
Date:           Sat Apr 18 15:06:18 UTC 2020

Modified Files:
        src/sys/arch/x86/include [bouyer-xenpvh]: cpu.h cpuvar.h
        src/sys/arch/x86/x86 [bouyer-xenpvh]: cpu.c mainbus.c
        src/sys/arch/xen/include [bouyer-xenpvh]: hypervisor.h xen.h
        src/sys/arch/xen/x86 [bouyer-xenpvh]: cpu.c hypervisor_machdep.c
            xen_ipi.c xen_mainbus.c
        src/sys/arch/xen/xen [bouyer-xenpvh]: evtchn.c hypervisor.c xen_clock.c

Log Message:
Add PVHVM multiprocessor support:
We need the hypervisor to be set up before cpus attaches.
Move hypervisor setup to a new function xen_hvm_init(), called at the
beggining of mainbus_attach(). This function searches the cfdata[] array
to see if the hypervisor device is enabled (so you can disable PV
support with
disable hypervisor
from userconf).
For HVM, ci_cpuid doens't match the virtual CPU index needed by Xen.
Introduce ci_vcpuid to cpu_info. Introduce xen_hvm_init_cpu(), to be
called for each CPU in in its context, which initialize ci_vcpuid and
ci_vcpu, and setup the event callback.
Change Xen code to use ci_vcpuid.

Do not call lapic_calibrate_timer() for VM_GUEST_XENPVHVM, we will use
Xen timers.

Don't call lapic_initclocks() from cpu_hatch(); instead set
x86_cpu_initclock_func to lapic_initclocks() in lapic_calibrate_timer(),
and call *(x86_cpu_initclock_func)() from cpu_hatch().
Also call x86_cpu_initclock_func from cpu_attach() for the boot CPU.
As x86_cpu_initclock_func is called for all CPUs, x86_initclock_func can
be a NOP for lapic timer.

Reorganize Xen code for x86_initclock_func/x86_cpu_initclock_func.
Move x86_cpu_idle_xen() to hypervisor_machdep.c

To generate a diff of this commit:
cvs rdiff -u -r1.117.4.5 -r1.117.4.6 src/sys/arch/x86/include/cpu.h
cvs rdiff -u -r1.51 -r1.51.10.1 src/sys/arch/x86/include/cpuvar.h
cvs rdiff -u -r1.181.4.2 -r1.181.4.3 src/sys/arch/x86/x86/cpu.c
cvs rdiff -u -r1.3.12.2 -r1.3.12.3 src/sys/arch/x86/x86/mainbus.c
cvs rdiff -u -r1.49.10.2 -r1.49.10.3 src/sys/arch/xen/include/hypervisor.h
cvs rdiff -u -r1.44 -r1.44.8.1 src/sys/arch/xen/include/xen.h
cvs rdiff -u -r1.133 -r1.133.4.1 src/sys/arch/xen/x86/cpu.c
cvs rdiff -u -r1.36.8.3 -r1.36.8.4 src/sys/arch/xen/x86/hypervisor_machdep.c
cvs rdiff -u -r1.35.6.3 -r1.35.6.4 src/sys/arch/xen/x86/xen_ipi.c
cvs rdiff -u -r1.6.12.2 -r1.6.12.3 src/sys/arch/xen/x86/xen_mainbus.c
cvs rdiff -u -r1.88.2.4 -r1.88.2.5 src/sys/arch/xen/xen/evtchn.c
cvs rdiff -u -r1.73.2.5 -r1.73.2.6 src/sys/arch/xen/xen/hypervisor.c
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/xen/xen/xen_clock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index