Re: [PATCH 4/4] KVM: x86: lapic: don't allow to set non default apic id when not using x2apic api

From: Maxim Levitsky
Date: Fri Mar 04 2022 - 05:54:48 EST


On Thu, 2022-03-03 at 19:49 +0000, Sean Christopherson wrote:
> On Thu, Mar 03, 2022, Sean Christopherson wrote:
> > With your proposed change, KVM_SET_LAPIC will fail and we've broken a functional,
> > if sketchy, setup. Is there likely to be such a real-world setup that doesn't
> > barf on the inconsistent x2APIC ID? Probably not, but I don't see any reason to
> > find out.
>
> I take back the "probably not", this isn't even all that contrived. Prior to the
> "migration", the guest will see a consistent x2APIC ID. It's not hard to imagine
> a guest that snapshots the ID and never re-reads the value from "hardware".
>
Ok. you win. I will not argue about this.

Best regards,
Maxim Levitsky