Re: [kvm-unit-tests PATCH v2] x86: Reset lapic after boot

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

 



On 27/06/19 12:39, Nadav Amit wrote:
> Do not assume that the local APIC is in a xAPIC mode after reset.
> Instead reset it first, since it might be in x2APIC mode, from which a
> transition in xAPIC is invalid.
> 
> To use reset_apic(), change it to use xapic_write(), in order to make safe to use
> while apic_ops might change concurrently by x2apic_enable().
> 
> Cc: Krish Sadhukhan <krish.sadhukhan@xxxxxxxxxx>
> Signed-off-by: Nadav Amit <nadav.amit@xxxxxxxxx>
> ---

Also needs the 32-bit version:

diff --git a/x86/cstart.S b/x86/cstart.S
index 2fa4c30..575101b 100644
--- a/x86/cstart.S
+++ b/x86/cstart.S
@@ -143,6 +143,7 @@ ap_start32:
 	lock/xaddl %esp, smp_stacktop
 	setup_percpu_area
 	call prepare_32
+	call reset_apic
 	call save_id
 	call load_tss
 	call enable_apic
@@ -155,6 +156,7 @@ ap_start32:
 	jmp 1b

 start32:
+	call reset_apic
 	call save_id
 	call load_tss
 	call mask_pic_interrupts

Paolo



[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