From: Ryan Afranji <afranji@google.com>
To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org
Cc: sagis@google.com, bp@alien8.de, chao.p.peng@linux.intel.com,
dave.hansen@linux.intel.com, dmatlack@google.com,
erdemaktas@google.com, isaku.yamahata@intel.com,
kai.huang@intel.com, mingo@redhat.com, pbonzini@redhat.com,
seanjc@google.com, tglx@linutronix.de, zhi.wang.linux@gmail.com,
ackerleytng@google.com, andrew.jones@linux.dev,
david@redhat.com, hpa@zytor.com,
kirill.shutemov@linux.intel.com,
linux-kselftest@vger.kernel.org, tabba@google.com,
vannapurve@google.com, yan.y.zhao@intel.com,
rick.p.edgecombe@intel.com, Ryan Afranji <afranji@google.com>
Subject: [RFC PATCH v2 00/10] Add TDX intra-host migration support
Date: Wed, 11 Jun 2025 21:16:27 +0000 [thread overview]
Message-ID: <cover.1749672978.git.afranji@google.com> (raw)
Hello,
This is RFC v2 for the TDX intra-host migration patch series. It
addresses comments in RFC v1 [1] and is rebased onto the latest kvm/next
(v6.16-rc1).
This patchset was built on top of the latest TDX selftests [2] and gmem
linking [3] RFC patch series.
Here is the series stitched together for your convenience:
https://github.com/googleprodkernel/linux-cc/tree/tdx-copyless-rfc-v2
Changes from RFC v1:
+ Added patch to prevent deadlock warnings by re-ordering locking order.
+ Added patch to allow vCPUs to be created for uninitialized VMs.
+ Minor optimizations to TDX intra-host migration core logic.
+ Moved lapic state transfer into TDX intra-host migration core logic.
+ Added logic to handle posted interrupts that are injected during
migration.
+ Added selftests.
+ Addressed comments from RFC v1.
+ Various small changes to make patchset compatible with latest version
of kvm/next.
[1] https://lore.kernel.org/lkml/20230407201921.2703758-2-sagis@google.com
[2] https://lore.kernel.org/lkml/20250414214801.2693294-2-sagis@google.com
[3] https://lore.kernel.org/all/cover.1747368092.git.afranji@google.com
Ackerley Tng (2):
KVM: selftests: Add TDX support for ucalls
KVM: selftests: Add irqfd/interrupts test for TDX with migration
Ryan Afranji (3):
KVM: x86: Adjust locking order in move_enc_context_from
KVM: TDX: Allow vCPUs to be created for migration
KVM: selftests: Refactor userspace_mem_region creation out of
vm_mem_add
Sagi Shahar (5):
KVM: Split tdp_mmu_pages to mirror and direct counters
KVM: TDX: Add base implementation for tdx_vm_move_enc_context_from
KVM: TDX: Implement moving mirror pages between 2 TDs
KVM: TDX: Add core logic for TDX intra-host migration
KVM: selftests: TDX: Add tests for TDX in-place migration
arch/x86/include/asm/kvm_host.h | 7 +-
arch/x86/kvm/mmu.h | 2 +
arch/x86/kvm/mmu/mmu.c | 66 ++++
arch/x86/kvm/mmu/tdp_mmu.c | 72 +++-
arch/x86/kvm/mmu/tdp_mmu.h | 6 +
arch/x86/kvm/svm/sev.c | 13 +-
arch/x86/kvm/vmx/main.c | 12 +-
arch/x86/kvm/vmx/tdx.c | 236 +++++++++++-
arch/x86/kvm/vmx/x86_ops.h | 1 +
arch/x86/kvm/x86.c | 14 +-
tools/testing/selftests/kvm/Makefile.kvm | 2 +
.../testing/selftests/kvm/include/kvm_util.h | 25 ++
.../selftests/kvm/include/x86/tdx/tdx_util.h | 3 +
.../selftests/kvm/include/x86/tdx/test_util.h | 5 +
.../testing/selftests/kvm/include/x86/ucall.h | 4 +-
tools/testing/selftests/kvm/lib/kvm_util.c | 222 ++++++++----
.../testing/selftests/kvm/lib/ucall_common.c | 2 +-
.../selftests/kvm/lib/x86/tdx/tdx_util.c | 63 +++-
.../selftests/kvm/lib/x86/tdx/test_util.c | 17 +
tools/testing/selftests/kvm/lib/x86/ucall.c | 108 ++++--
.../kvm/x86/tdx_irqfd_migrate_test.c | 264 ++++++++++++++
.../selftests/kvm/x86/tdx_migrate_tests.c | 337 ++++++++++++++++++
22 files changed, 1349 insertions(+), 132 deletions(-)
create mode 100644 tools/testing/selftests/kvm/x86/tdx_irqfd_migrate_test.c
create mode 100644 tools/testing/selftests/kvm/x86/tdx_migrate_tests.c
--
2.50.0.rc1.591.g9c95f17f64-goog
next reply other threads:[~2025-06-11 21:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-11 21:16 Ryan Afranji [this message]
2025-06-11 21:16 ` [RFC PATCH v2 01/10] KVM: Split tdp_mmu_pages to mirror and direct counters Ryan Afranji
2025-06-11 21:16 ` [RFC PATCH v2 02/10] KVM: x86: Adjust locking order in move_enc_context_from Ryan Afranji
2025-06-11 21:16 ` [RFC PATCH v2 03/10] KVM: TDX: Add base implementation for tdx_vm_move_enc_context_from Ryan Afranji
2025-06-11 21:16 ` [RFC PATCH v2 04/10] KVM: TDX: Implement moving mirror pages between 2 TDs Ryan Afranji
2025-06-11 21:16 ` [RFC PATCH v2 05/10] KVM: TDX: Allow vCPUs to be created for migration Ryan Afranji
2025-06-11 21:16 ` [RFC PATCH v2 06/10] KVM: TDX: Add core logic for TDX intra-host migration Ryan Afranji
2025-06-11 21:16 ` [RFC PATCH v2 07/10] KVM: selftests: Refactor userspace_mem_region creation out of vm_mem_add Ryan Afranji
2025-06-11 21:16 ` [RFC PATCH v2 08/10] KVM: selftests: TDX: Add tests for TDX in-place migration Ryan Afranji
2025-06-11 21:16 ` [RFC PATCH v2 09/10] KVM: selftests: Add TDX support for ucalls Ryan Afranji
2025-06-11 21:16 ` [RFC PATCH v2 10/10] KVM: selftests: Add irqfd/interrupts test for TDX with migration Ryan Afranji
2026-03-09 14:17 ` [RFC PATCH v2 00/10] Add TDX intra-host migration support Sean Christopherson
2026-03-09 15:04 ` Vishal Annapurve
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=cover.1749672978.git.afranji@google.com \
--to=afranji@google.com \
--cc=ackerleytng@google.com \
--cc=andrew.jones@linux.dev \
--cc=bp@alien8.de \
--cc=chao.p.peng@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=david@redhat.com \
--cc=dmatlack@google.com \
--cc=erdemaktas@google.com \
--cc=hpa@zytor.com \
--cc=isaku.yamahata@intel.com \
--cc=kai.huang@intel.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=rick.p.edgecombe@intel.com \
--cc=sagis@google.com \
--cc=seanjc@google.com \
--cc=tabba@google.com \
--cc=tglx@linutronix.de \
--cc=vannapurve@google.com \
--cc=x86@kernel.org \
--cc=yan.y.zhao@intel.com \
--cc=zhi.wang.linux@gmail.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.