* FYI: xapic_state_test selftest fails with avic enabled
@ 2022-08-23 12:57 Maxim Levitsky
2022-08-23 14:19 ` Sean Christopherson
0 siblings, 1 reply; 2+ messages in thread
From: Maxim Levitsky @ 2022-08-23 12:57 UTC (permalink / raw)
To: Sean Christopherson; +Cc: kvm, pbonzini, Suravee Suthikulpanit
Hi!
I just noticed that this test fails when the AVIC is enabled.
It seems that it exposes actual shortcomings in the AVIC hardware implementation,
although these should not matter in real life usage of it.
First of all it seems that AVIC just allows to set the APIC_ICR_BUSY bit (it should be read-only)
and it never clears it if set.
Second AVIC seems to drop writes to low 24 bits of to ICR2, because these are not really used,
although technically not marked as reserved in the spec (though APIC_ID register in AMD spec,
states explicity that only bits 24-31 can be set, and the rest are reserved).
And finally AVIC inhibit when x2apic is exposed to the guest was recently removed,
because in this case AVIC also works just fine (but with msr emulation) and that
means that we don't need anymore to hide x2apic from the guest to avoid AVIC inhibit.
Best regards,
Maxim Levitsky
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: FYI: xapic_state_test selftest fails with avic enabled
2022-08-23 12:57 FYI: xapic_state_test selftest fails with avic enabled Maxim Levitsky
@ 2022-08-23 14:19 ` Sean Christopherson
0 siblings, 0 replies; 2+ messages in thread
From: Sean Christopherson @ 2022-08-23 14:19 UTC (permalink / raw)
To: Maxim Levitsky; +Cc: kvm, pbonzini, Suravee Suthikulpanit
On Tue, Aug 23, 2022, Maxim Levitsky wrote:
> Hi!
>
> I just noticed that this test fails when the AVIC is enabled.
>
> It seems that it exposes actual shortcomings in the AVIC hardware implementation,
> although these should not matter in real life usage of it.
>
>
> First of all it seems that AVIC just allows to set the APIC_ICR_BUSY bit (it should be read-only)
> and it never clears it if set.
>
> Second AVIC seems to drop writes to low 24 bits of to ICR2, because these are not really used,
> although technically not marked as reserved in the spec (though APIC_ID register in AMD spec,
> states explicity that only bits 24-31 can be set, and the rest are reserved).
>
> And finally AVIC inhibit when x2apic is exposed to the guest was recently removed,
> because in this case AVIC also works just fine (but with msr emulation) and that
> means that we don't need anymore to hide x2apic from the guest to avoid AVIC inhibit.
KUT's APIC test also fails for a variety of reasons when AVIC is enabled.
https://lore.kernel.org/all/20220204214410.3315068-1-seanjc@google.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-23 16:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-23 12:57 FYI: xapic_state_test selftest fails with avic enabled Maxim Levitsky
2022-08-23 14:19 ` Sean Christopherson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox