mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-25 10:43:46 +00:00
hv: Use virtual APIC IDs for Pre-launched VMs
For Pre-launched VMs, ACRN uses mptable for reporting APIC IDs to guest OS. In current code, ACRN uses physical LAPIC IDs for vLAPIC IDs. This patch is to let ACRN use vCPU id for vLAPIC IDs and also report the same when building mptable. ACRN should still use physical LAPIC IDs for SOS because host ACPI tables are passthru to SOS. Tracked-On: #2934 Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com> Acked-by: Eddie Dong <eddie.dong@Intel.com>
This commit is contained in:
committed by
Eddie Dong
parent
8796ded21b
commit
6915264740
@@ -115,7 +115,7 @@ int32_t mptable_build(struct acrn_vm *vm)
|
||||
|
||||
(void *)memcpy_s((void *)(mptable->proc_entry_array + i), sizeof(struct proc_entry),
|
||||
(const void *)&proc_entry_template, sizeof(struct proc_entry));
|
||||
mptable->proc_entry_array[i].apic_id = per_cpu(lapic_id, pcpu_id);
|
||||
mptable->proc_entry_array[i].apic_id = (uint8_t) i;
|
||||
if (i == 0) {
|
||||
mptable->proc_entry_array[i].cpu_flags |= PROCENTRY_FLAG_BP;
|
||||
}
|
||||
|
Reference in New Issue
Block a user