Re: [RFC PATCH v7 01/37] KVM: lapic: Remove __apic_test_and_{set|clear}_vector()

From: Borislav Petkov
Date: Mon Jun 23 2025 - 07:27:02 EST


On Tue, Jun 10, 2025 at 11:23:48PM +0530, Neeraj Upadhyay wrote:
> Remove __apic_test_and_set_vector() and __apic_test_and_clear_vector(),
> because the _only_ register that's safe to modify with a non-atomic
> operation is ISR, because KVM isn't running the vCPU, i.e. hardware can't
> service an IRQ or process an EOI for the relevant (virtual) APIC.
>
> No functional change intended.
>
> Suggested-by: Sean Christopherson <seanjc@xxxxxxxxxx>
> [Neeraj: Add "inline" for apic_vector_to_isr()]
> Signed-off-by: Neeraj Upadhyay <Neeraj.Upadhyay@xxxxxxx>
> ---
> Changes since v6:
>
> - New change.
>
> arch/x86/kvm/lapic.c | 19 +++++++------------
> 1 file changed, 7 insertions(+), 12 deletions(-)

FWIW: LGTM.

:-)

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette