Re: [PATCH] x86,spinlock: make disabling virt_spin_lock_key contingent on CONFIG_PARAVIRT

From: Jürgen Groß
Date: Tue Jul 16 2024 - 05:41:46 EST


On 15.07.24 19:18, Rik van Riel wrote:
The existence of virt_spin_lock_key is contingent only on CONFIG_PARAVIRT, not
on CONFIG_PARAVIRT_SPINLOCKS.

As a result, a kernel with CONFIG_PARAVIRT enabled, but CONFIG_PARAVIRT_SPINLOCKS
disabled will end up disabling queued spinlocks when running on bare metal.

Making the disabling of virt_spin_lock_key contingent on CONFIG_PARAVIRT, which
controls whether the key exists, results in queued spinlocks being enabled on
bare metal again.

Signed-off-by: Rik van Riel <riel@xxxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
Fixes: ce0a1b608bfc ("x86/paravirt: Silence unused native_pv_lock_init() function warning")

Reviewed-by: Juergen Gross <jgross@xxxxxxxx>


Juergen