xen: remove xenpv_set_ids
The vcpu_id for legacy PVH mode can be set from the output of cpuid, so there's no need to have a special function to set it. Also note that xenpv_set_ids should have been executed only for PV guests, but was executed for all guests types and vcpu_id was later fixed up for HVM guests. Reported by: cperciva Approved by: re (gjb) Sponsored by: Citrix Systems R&D
This commit is contained in:
parent
fae9a0cb9b
commit
c9a591b0f6
@ -419,6 +419,9 @@ xen_hvm_cpu_init(void)
|
||||
*/
|
||||
KASSERT(cpuid_base != 0, ("Invalid base Xen CPUID leaf"));
|
||||
cpuid_count(cpuid_base + 4, 0, regs);
|
||||
KASSERT((regs[0] & XEN_HVM_CPUID_VCPU_ID_PRESENT) ||
|
||||
!xen_pv_domain(),
|
||||
("Xen PV domain without vcpu_id in cpuid"));
|
||||
PCPU_SET(vcpu_id, (regs[0] & XEN_HVM_CPUID_VCPU_ID_PRESENT) ?
|
||||
regs[1] : PCPU_GET(acpi_id));
|
||||
|
||||
|
@ -249,19 +249,3 @@ xenpv_register(void *dummy __unused)
|
||||
}
|
||||
}
|
||||
SYSINIT(xenpv_register, SI_SUB_TUNABLES - 1, SI_ORDER_FIRST, xenpv_register, NULL);
|
||||
|
||||
/*
|
||||
* Setup per-CPU vCPU IDs
|
||||
*/
|
||||
static void
|
||||
xenpv_set_ids(void *dummy)
|
||||
{
|
||||
struct pcpu *pc;
|
||||
int i;
|
||||
|
||||
CPU_FOREACH(i) {
|
||||
pc = pcpu_find(i);
|
||||
pc->pc_vcpu_id = i;
|
||||
}
|
||||
}
|
||||
SYSINIT(xenpv_set_ids, SI_SUB_CPU, SI_ORDER_MIDDLE, xenpv_set_ids, NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user