From: Sean Christopherson <seanjc@google.com>
To: Sasha Levin <sashal@kernel.org>
Cc: stable@vger.kernel.org, Chao Gao <chao.gao@intel.com>,
Kai Huang <kai.huang@intel.com>
Subject: Re: [PATCH 5.15.y] KVM: VMX: Flush shadow VMCS on emergency reboot
Date: Thu, 14 Aug 2025 13:33:22 -0700 [thread overview]
Message-ID: <aJ5IEp6DFSLzP5nl@google.com> (raw)
In-Reply-To: <20250724181134.1457856-1-sashal@kernel.org>
On Thu, Jul 24, 2025, Sasha Levin wrote:
> From: Chao Gao <chao.gao@intel.com>
>
> [ Upstream commit a0ee1d5faff135e28810f29e0f06328c66f89852 ]
>
> Ensure the shadow VMCS cache is evicted during an emergency reboot to
> prevent potential memory corruption if the cache is evicted after reboot.
>
> This issue was identified through code inspection, as __loaded_vmcs_clear()
> flushes both the normal VMCS and the shadow VMCS.
>
> Avoid checking the "launched" state during an emergency reboot, unlike the
> behavior in __loaded_vmcs_clear(). This is important because reboot NMIs
> can interfere with operations like copy_shadow_to_vmcs12(), where shadow
> VMCSes are loaded directly using VMPTRLD. In such cases, if NMIs occur
> right after the VMCS load, the shadow VMCSes will be active but the
> "launched" state may not be set.
>
> Fixes: 16f5b9034b69 ("KVM: nVMX: Copy processor-specific shadow-vmcs to VMCS12")
> Cc: stable@vger.kernel.org
> Signed-off-by: Chao Gao <chao.gao@intel.com>
> Reviewed-by: Kai Huang <kai.huang@intel.com>
> Link: https://lore.kernel.org/r/20250324140849.2099723-1-chao.gao@intel.com
> Signed-off-by: Sean Christopherson <seanjc@google.com>
> [ adjusted context ]
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
Acked-by: Sean Christopherson <seanjc@google.com>
prev parent reply other threads:[~2025-08-14 20:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-20 9:06 FAILED: patch "[PATCH] KVM: VMX: Flush shadow VMCS on emergency reboot" failed to apply to 5.15-stable tree gregkh
2025-07-24 18:11 ` [PATCH 5.15.y] KVM: VMX: Flush shadow VMCS on emergency reboot Sasha Levin
2025-08-14 20:33 ` 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=aJ5IEp6DFSLzP5nl@google.com \
--to=seanjc@google.com \
--cc=chao.gao@intel.com \
--cc=kai.huang@intel.com \
--cc=sashal@kernel.org \
--cc=stable@vger.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;
as well as URLs for NNTP newsgroup(s).