diff options
author | gibbs <gibbs@FreeBSD.org> | 2013-10-05 23:11:01 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 2013-10-05 23:11:01 +0000 |
commit | 9c8c76f921175f7cebcd3cd61d9086c333b96e35 (patch) | |
tree | c4b59481817d15ea30e15e04f5ceb28ea7ae41a1 /sys/dev/xen/timer/timer.c | |
parent | aed205d5cd3901acd2a0cf583e44ec166d99191a (diff) | |
download | FreeBSD-src-9c8c76f921175f7cebcd3cd61d9086c333b96e35.zip FreeBSD-src-9c8c76f921175f7cebcd3cd61d9086c333b96e35.tar.gz |
Formalize the concept of virtual CPU ids by adding a per-cpu vcpu_id
field. Perform vcpu enumeration for Xen PV and HVM environments
and convert all Xen drivers to use vcpu_id instead of a hard coded
assumption of the mapping algorithm (acpi or apic ID) in use.
Submitted by: Roger Pau Monné
Sponsored by: Citrix Systems R&D
Reviewed by: gibbs
Approved by: re (blanket Xen)
amd64/include/pcpu.h:
i386/include/pcpu.h:
Add vcpu_id to the amd64 and i386 pcpu structures.
dev/xen/timer/timer.c
x86/xen/xen_intr.c
Use new vcpu_id instead of assuming acpi_id == vcpu_id.
i386/xen/mp_machdep.c:
i386/xen/mptable.c
x86/xen/hvm.c:
Perform Xen HVM and Xen full PV vcpu_id mapping.
x86/xen/hvm.c:
x86/acpica/madt.c
Change SYSINIT ordering of acpi CPU enumeration so that it
is guaranteed to be available at the time of Xen HVM vcpu
id mapping.
Diffstat (limited to 'sys/dev/xen/timer/timer.c')
-rw-r--r-- | sys/dev/xen/timer/timer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/xen/timer/timer.c b/sys/dev/xen/timer/timer.c index 605e5c5..824c75b 100644 --- a/sys/dev/xen/timer/timer.c +++ b/sys/dev/xen/timer/timer.c @@ -396,7 +396,7 @@ xentimer_et_start(struct eventtimer *et, { int error = 0, i = 0; struct xentimer_softc *sc = et->et_priv; - int cpu = PCPU_GET(acpi_id); + int cpu = PCPU_GET(vcpu_id); struct xentimer_pcpu_data *pcpu = DPCPU_PTR(xentimer_pcpu); uint64_t first_in_ns, next_time; @@ -433,7 +433,7 @@ xentimer_et_start(struct eventtimer *et, static int xentimer_et_stop(struct eventtimer *et) { - int cpu = PCPU_GET(acpi_id); + int cpu = PCPU_GET(vcpu_id); struct xentimer_pcpu_data *pcpu = DPCPU_PTR(xentimer_pcpu); pcpu->timer = 0; |