From: Paolo Bonzini <pbonzini@redhat.com>
To: Sasha Levin <sashal@kernel.org>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Sean Christopherson <seanjc@google.com>,
tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH MANUALSEL 5.14 2/5] KVM: x86: WARN if APIC HW/SW disable static keys are non-zero on unload
Date: Tue, 26 Oct 2021 18:15:07 +0200 [thread overview]
Message-ID: <35e414f8-c9b4-826c-e679-6b2ac3584536@redhat.com> (raw)
In-Reply-To: <20211025203828.1404503-2-sashal@kernel.org>
On 25/10/21 22:38, Sasha Levin wrote:
> From: Sean Christopherson <seanjc@google.com>
>
> [ Upstream commit 9139a7a64581c80d157027ae20e86f2f24d4292c ]
>
> WARN if the static keys used to track if any vCPU has disabled its APIC
> are left elevated at module exit. Unlike the underflow case, nothing in
> the static key infrastructure will complain if a key is left elevated,
> and because an elevated key only affects performance, nothing in KVM will
> fail if either key is improperly incremented.
>
> Signed-off-by: Sean Christopherson <seanjc@google.com>
> Message-Id: <20211013003554.47705-3-seanjc@google.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> arch/x86/kvm/lapic.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> index ba5a27879f1d..18cb699b0a14 100644
> --- a/arch/x86/kvm/lapic.c
> +++ b/arch/x86/kvm/lapic.c
> @@ -2942,5 +2942,7 @@ int kvm_apic_accept_events(struct kvm_vcpu *vcpu)
> void kvm_lapic_exit(void)
> {
> static_key_deferred_flush(&apic_hw_disabled);
> + WARN_ON(static_branch_unlikely(&apic_hw_disabled.key));
> static_key_deferred_flush(&apic_sw_disabled);
> + WARN_ON(static_branch_unlikely(&apic_sw_disabled.key));
> }
>
NACK
Paolo
next prev parent reply other threads:[~2021-10-26 16:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 20:38 [PATCH MANUALSEL 5.14 1/5] KVM: X86: fix lazy allocation of rmaps Sasha Levin
2021-10-25 20:38 ` [PATCH MANUALSEL 5.14 2/5] KVM: x86: WARN if APIC HW/SW disable static keys are non-zero on unload Sasha Levin
2021-10-26 16:15 ` Paolo Bonzini [this message]
2021-10-25 20:38 ` [PATCH MANUALSEL 5.14 3/5] KVM: VMX: Remove redundant handling of bus lock vmexit Sasha Levin
2021-10-26 16:15 ` Paolo Bonzini
2021-10-25 20:38 ` [PATCH MANUALSEL 5.14 4/5] KVM: SEV-ES: Set guest_state_protected after VMSA update Sasha Levin
2021-10-26 16:16 ` Paolo Bonzini
2021-10-25 20:38 ` [PATCH MANUALSEL 5.14 5/5] KVM: MMU: Reset mmu->pkru_mask to avoid stale data Sasha Levin
2021-10-26 16:17 ` Paolo Bonzini
2021-10-26 16:14 ` [PATCH MANUALSEL 5.14 1/5] KVM: X86: fix lazy allocation of rmaps Paolo Bonzini
2021-10-26 17:32 ` Sasha Levin
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=35e414f8-c9b4-826c-e679-6b2ac3584536@redhat.com \
--to=pbonzini@redhat.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=sashal@kernel.org \
--cc=seanjc@google.com \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox