From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Maxim Levitsky <mlevitsk@redhat.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: Re: [PATCH 0/8] KVM: x86: Fix ICR handling when x2AVIC is active
Date: Fri, 19 Jul 2024 16:49:01 -0700 [thread overview]
Message-ID: <Zpr7bRMdinPsPWBU@google.com> (raw)
In-Reply-To: <20240719234346.3020464-1-seanjc@google.com>
On Fri, Jul 19, 2024, Sean Christopherson wrote:
> I made the mistake of expanding my testing to run with and without AVIC
> enabled, and to my surprise (wow, sarcasm), x2AVIC failed hard on the
> xapic_state_test due to ICR issues.
>
> AFAICT, the issue is that AMD splits the 64-bit ICR into the legacy ICR
> and ICR2 fields when storing the ICR in the vAPIC (apparently "it's a
> single 64-bit register" is open to intepretation). Aside from causing
> the selftest failure and potential live migration issues, botching the
> format is quite bad, as KVM will mishandle incomplete virtualized IPIs,
> e.g. generate IRQs to the wrong vCPU, drop IRQs, etc.
>
> Patch 1 fixes are rather annoying wart where the xapic_state *deliberately*
> skips reserved bit tests to work around a KVM bug. *sigh*
>
> I couldn't find anything definitive in the APM, my findings are based on
> testing on Genoa.
>
> Sean Christopherson (8):
> KVM: x86: Enforce x2APIC's must-be-zero reserved ICR bits
> KVM: x86: Move x2APIC ICR helper above kvm_apic_write_nodecode()
> KVM: x86: Re-split x2APIC ICR into ICR+ICR2 for AMD (x2AVIC)
> KVM: selftests: Open code vcpu_run() equivalent in guest_printf test
> KVM: selftests: Report unhandled exceptions on x86 as regular guest
> asserts
> KVM: selftests: Add x86 helpers to play nice with x2APIC MSR #GPs
> KVM: selftests: Skip ICR.BUSY test in xapic_state_test if x2APIC is
> enabled
> KVM: selftests: Test x2APIC ICR reserved bits
Gah, ignore this version, I managed to hit send in the middle of a rebase and
left off two patches. I'll post a v2 to minimize confusion.
prev parent reply other threads:[~2024-07-19 23:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-19 23:43 [PATCH 0/8] KVM: x86: Fix ICR handling when x2AVIC is active Sean Christopherson
2024-07-19 23:43 ` [PATCH 1/8] KVM: x86: Enforce x2APIC's must-be-zero reserved ICR bits Sean Christopherson
2024-07-19 23:43 ` [PATCH 2/8] KVM: x86: Move x2APIC ICR helper above kvm_apic_write_nodecode() Sean Christopherson
2024-07-19 23:43 ` [PATCH 3/8] KVM: x86: Re-split x2APIC ICR into ICR+ICR2 for AMD (x2AVIC) Sean Christopherson
2024-07-19 23:43 ` [PATCH 4/8] KVM: selftests: Open code vcpu_run() equivalent in guest_printf test Sean Christopherson
2024-07-19 23:43 ` [PATCH 5/8] KVM: selftests: Report unhandled exceptions on x86 as regular guest asserts Sean Christopherson
2024-07-19 23:43 ` [PATCH 6/8] KVM: selftests: Add x86 helpers to play nice with x2APIC MSR #GPs Sean Christopherson
2024-07-19 23:43 ` [PATCH 7/8] KVM: selftests: Skip ICR.BUSY test in xapic_state_test if x2APIC is enabled Sean Christopherson
2024-07-19 23:43 ` [PATCH 8/8] KVM: selftests: Test x2APIC ICR reserved bits Sean Christopherson
2024-07-19 23:49 ` Sean Christopherson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zpr7bRMdinPsPWBU@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mlevitsk@redhat.com \
--cc=pbonzini@redhat.com \
--cc=suravee.suthikulpanit@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.