Re: [kvm-unit-tests PATCH v1 1/1] lib/s390x: fix SMP setup bug

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

 



Quoting Claudio Imbrenda (2022-08-18 17:21:14)
> The lowcore pointer pointing to the current CPU (THIS_CPU) was not
> initialized for the boot CPU. The pointer is needed for correct
> interrupt handling, which is needed in the setup process before the
> struct cpu array is allocated.
> 
> The bug went unnoticed because some environments (like qemu/KVM) clear
> all memory and don't write anything in the lowcore area before starting
> the payload. The pointer thus pointed to 0, an area of memory also not
> used. Other environments will write to memory before starting the
> payload, causing the unit tests to crash at the first interrupt.
> 
> Fix by assigning a temporary struct cpu before the rest of the setup
> process, and assigning the pointer to the correct allocated struct
> during smp initialization.
> 
> Fixes: 4e5dd758 ("lib: s390x: better smp interrupt checks")
> Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>

Reviewed-and-tested-by: Nico Boehr <nrb@xxxxxxxxxxxxx>




[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