Re: [sos-linux-ext-patches] [RFC 05/14] x86/apic: Initialize APIC ID for Secure AVIC
From: Borislav Petkov
Date: Sun Nov 10 2024 - 11:35:55 EST
On Sun, Nov 10, 2024 at 08:52:03PM +0530, Neeraj Upadhyay wrote:
> If I get your point, unless a corrective action is possible without
> hard reboot of the guest, doing a snp_abort() on detecting mismatch works better
> here. That way, the issue can be caught early, and it does not disrupt the running
> applications on a limping guest (which happens for the case where we only emit
> a warning). So, thinking more, snp_abort() looks more apt here.
Well, sometimes you have no influence on the HV (public cloud, for example).
So WARN_ONCE was on the right track but the error message should be more
user-friendly:
WARN_ONCE(hv_apic_id != apic_id,
"APIC IDs mismatch: %d (HV: %d). IPI handling will suffer!",
apic_id, hv_apic_id);
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette