From: Adrian Hunter <adrian.hunter@intel.com>
To: Dave Hansen <dave.hansen@linux.intel.com>,
Tony Luck <tony.luck@intel.com>,
pbonzini@redhat.com, seanjc@google.com
Cc: vannapurve@google.com, Borislav Petkov <bp@alien8.de>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
x86@kernel.org, H Peter Anvin <hpa@zytor.com>,
linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
kvm@vger.kernel.org, rick.p.edgecombe@intel.com,
kai.huang@intel.com, reinette.chatre@intel.com,
xiaoyao.li@intel.com, tony.lindgren@linux.intel.com,
binbin.wu@linux.intel.com, ira.weiny@intel.com,
isaku.yamahata@intel.com, Fan Du <fan.du@intel.com>,
Yazen Ghannam <yazen.ghannam@amd.com>,
yan.y.zhao@intel.com, chao.gao@intel.com
Subject: [PATCH RESEND V2 0/2] Fixes for recovery for machine check in TDX/SEAM non-root mode
Date: Tue, 19 Aug 2025 19:24:33 +0300 [thread overview]
Message-ID: <20250819162436.137625-1-adrian.hunter@intel.com> (raw)
Hi
Here is V2 of a small fix related to recovery for machine check in TDX/SEAM
non-root mode, and a small tidy-up.
Changes in V2:
x86/mce: Fix missing address mask in recovery for errors in TDX/SEAM
non-root mode
Mask address when it is read
Amend struct mce addr description
KVM: TDX: Do not clear poisoned pages
Patch dropped
x86/mce: Remove MCI_ADDR_PHYSADDR
New patch
The issue was noticed as part of work to determine the conditions under
which TDX private memory needs to be cleared after being reclaimed.
For guests with a large amount of memory, clearing all private pages during
VM shutdown can take minutes, so we are looking at when that can be
skipped. A future patch will deal with that.
One thing that was investigated was the effect of deliberately corrupting a
TDX guest private page by writing to it on the host, and then reading it
on the guest, which results in a machine check as expected, but revealed
the issue addressed in patch 1.
There are 2 outstanding issues:
1. It is assumed that once the TDX VM is shutdown that the memory is
returned to the allocator. That is true at present, but may not be in the
future. Consider, for example, patch set "New KVM ioctl to link a gmem
inode to a new gmem file" :
https://lore.kernel.org/r/cover.1747368092.git.afranji@google.com/
2. Currently, KVM TDX does not cater for the TDX VM to enter a FATAL error
state, where the only operation permitted is to tear down the VM. KVM just
carries on, hitting various errors, but in particular, memory reclaim fails
because it is not following the teardown procedure, and all guest private
memory is leaked.
Adrian Hunter (2):
x86/mce: Fix missing address mask in recovery for errors in TDX/SEAM non-root mode
x86/mce: Remove MCI_ADDR_PHYSADDR
arch/x86/include/asm/mce.h | 3 ---
arch/x86/include/uapi/asm/mce.h | 2 +-
arch/x86/kernel/cpu/mce/core.c | 9 ++++++---
drivers/cxl/core/mce.c | 2 +-
drivers/edac/skx_common.c | 2 +-
5 files changed, 9 insertions(+), 9 deletions(-)
Regards
Adrian
next reply other threads:[~2025-08-19 16:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-19 16:24 Adrian Hunter [this message]
2025-08-19 16:24 ` [PATCH RESEND V2 1/2] x86/mce: Fix missing address mask in recovery for errors in TDX/SEAM non-root mode Adrian Hunter
2025-08-19 17:28 ` Yazen Ghannam
2025-08-19 17:51 ` Luck, Tony
2025-08-19 17:58 ` Adrian Hunter
2025-08-19 18:03 ` Luck, Tony
2025-08-20 15:59 ` Adrian Hunter
2025-08-20 16:12 ` Luck, Tony
2025-08-20 17:56 ` Yazen Ghannam
2025-08-21 6:49 ` Adrian Hunter
2025-08-19 21:32 ` Borislav Petkov
2025-08-21 7:24 ` Adrian Hunter
2025-08-21 13:25 ` Borislav Petkov
2025-08-22 7:57 ` Adrian Hunter
2025-08-22 13:54 ` Borislav Petkov
2025-08-22 14:54 ` Adrian Hunter
2025-08-27 8:22 ` Adrian Hunter
2025-08-27 8:29 ` Borislav Petkov
2025-08-19 16:24 ` [PATCH RESEND V2 2/2] x86/mce: Remove MCI_ADDR_PHYSADDR Adrian Hunter
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=20250819162436.137625-1-adrian.hunter@intel.com \
--to=adrian.hunter@intel.com \
--cc=binbin.wu@linux.intel.com \
--cc=bp@alien8.de \
--cc=chao.gao@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=fan.du@intel.com \
--cc=hpa@zytor.com \
--cc=ira.weiny@intel.com \
--cc=isaku.yamahata@intel.com \
--cc=kai.huang@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=reinette.chatre@intel.com \
--cc=rick.p.edgecombe@intel.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=tony.lindgren@linux.intel.com \
--cc=tony.luck@intel.com \
--cc=vannapurve@google.com \
--cc=x86@kernel.org \
--cc=xiaoyao.li@intel.com \
--cc=yan.y.zhao@intel.com \
--cc=yazen.ghannam@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 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).