[kvm-unit-tests PATCH 2/2] x86: cstart64: Put APIC into xAPIC after loading TSS

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

 



Now that pre_boot_apic_id() works with either xAPIC or x2APIC, "reset"
the APIC after configuring loading the TSS.  Previously, load_tss() =>
setup_tss() needed to run after forcing the vCPU into xAPIC mode due to
pre_boot_apic_id() assuming xAPIC.

The order doesn't truly matter at this point, but loading the TSS first
will allow sharing code with the EFI boot flow, which "needs" to load the
TSS (more specifically, needs to configure GS.base) prior to forcing the
vCPU into xAPIC (and thus setting the per-vCPU APIC ops).

Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
---
 x86/cstart64.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/x86/cstart64.S b/x86/cstart64.S
index 7272452..5269424 100644
--- a/x86/cstart64.S
+++ b/x86/cstart64.S
@@ -188,8 +188,8 @@ save_id:
 	retq
 
 ap_start64:
-	call reset_apic
 	load_tss
+	call reset_apic
 	call enable_apic
 	call save_id
 	call enable_x2apic
@@ -201,8 +201,8 @@ ap_start64:
 	jmp 1b
 
 start64:
-	call reset_apic
 	load_tss
+	call reset_apic
 	call mask_pic_interrupts
 	call enable_apic
 	call save_id
-- 
2.37.1.359.gd136c6c3e2-goog




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux