From 9c8c76f921175f7cebcd3cd61d9086c333b96e35 Mon Sep 17 00:00:00 2001 From: gibbs Date: Sat, 5 Oct 2013 23:11:01 +0000 Subject: 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. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- sys/amd64/include/pcpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/amd64/include') diff --git a/sys/amd64/include/pcpu.h b/sys/amd64/include/pcpu.h index 3d51512..fe898e9 100644 --- a/sys/amd64/include/pcpu.h +++ b/sys/amd64/include/pcpu.h @@ -62,7 +62,8 @@ u_int pc_cmci_mask; /* MCx banks for CMCI */ \ uint64_t pc_dbreg[16]; /* ddb debugging regs */ \ int pc_dbreg_cmd; /* ddb debugging reg cmd */ \ - char __pad[161] /* be divisor of PAGE_SIZE \ + u_int pc_vcpu_id; /* Xen vCPU ID */ \ + char __pad[157] /* be divisor of PAGE_SIZE \ after cache alignment */ #define PC_DBREG_CMD_NONE 0 -- cgit v1.1