public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Oliver Upton <oliver.upton@linux.dev>,
	James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>,
	kvmarm@lists.linux.dev, Huacai Chen <chenhuacai@kernel.org>,
	Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>,
	Anup Patel <anup@brainfault.org>,
	Atish Patra <atishp@atishpatra.org>,
	kvm-riscv@lists.infradead.org
Subject: Re: [PATCH v2 0/2] KVM: Fix race between reboot and hardware enabling
Date: Thu, 18 May 2023 08:38:20 +0100	[thread overview]
Message-ID: <86jzx6ks2b.wl-maz@kernel.org> (raw)
In-Reply-To: <20230512233127.804012-1-seanjc@google.com>

On Sat, 13 May 2023 00:31:25 +0100,
Sean Christopherson <seanjc@google.com> wrote:
> 
> Fix a bug where enabling hardware virtualization can race with a forced
> reboot, e.g. `reboot -f`, and result in virt hardware being enabled when
> the reboot is attempted, and thus hanging the reboot.
> 
> Found by inspection, confirmed by hacking the reboot flow to wait until
> KVM loads (the problematic window is ridiculously small).
> 
> Fully tested only on x86, compile tested on other architectures.
> 
> v2:
>  - Rename KVM's callback to kvm_shutdown() to match the hook. [Marc]
>  - Don't add a spurious newline. [Marc]
> 
> v1: https://lore.kernel.org/all/20230310221414.811690-1-seanjc@google.com
> 
> Sean Christopherson (2):
>   KVM: Use syscore_ops instead of reboot_notifier to hook
>     restart/shutdown
>   KVM: Don't enable hardware after a restart/shutdown is initiated
> 
>  virt/kvm/kvm_main.c | 43 +++++++++++++++++++++++++++----------------
>  1 file changed, 27 insertions(+), 16 deletions(-)

Acked-by: Marc Zyngier <maz@kernel.org>

	M.

-- 
Without deviation from the norm, progress is not possible.

  parent reply	other threads:[~2023-05-18  7:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-12 23:31 [PATCH v2 0/2] KVM: Fix race between reboot and hardware enabling Sean Christopherson
2023-05-12 23:31 ` [PATCH v2 1/2] KVM: Use syscore_ops instead of reboot_notifier to hook restart/shutdown Sean Christopherson
2023-12-09  7:26   ` Gowans, James
2023-12-10  4:53     ` Eric W. Biederman
2023-12-11  7:54       ` Gowans, James
2023-12-11 10:27         ` Gowans, James
2023-12-11 23:50           ` Eric W. Biederman
2023-12-12  8:50             ` Gowans, James
2023-12-12 13:38               ` Paolo Bonzini
2023-12-13  6:47               ` Gowans, James
2023-12-11 17:34     ` Sean Christopherson
2023-12-11 17:51       ` Sean Christopherson
2023-12-11 18:47       ` Gowans, James
2023-05-12 23:31 ` [PATCH v2 2/2] KVM: Don't enable hardware after a restart/shutdown is initiated Sean Christopherson
2023-05-18  7:38 ` Marc Zyngier [this message]
2023-05-19 17:41 ` [PATCH v2 0/2] KVM: Fix race between reboot and hardware enabling Paolo Bonzini

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=86jzx6ks2b.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=aleksandar.qemu.devel@gmail.com \
    --cc=anup@brainfault.org \
    --cc=atishp@atishpatra.org \
    --cc=chenhuacai@kernel.org \
    --cc=james.morse@arm.com \
    --cc=kvm-riscv@lists.infradead.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=suzuki.poulose@arm.com \
    --cc=yuzenghui@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox