KVM: VMX: Super early file refactor for TDX
cover KVM: VMX: Super early file refactor for TDX
Rename vmx/ops.h to vmx/vmx_ops.h, and move VMX's posted interrupt support to dedicated files in preparation for future Trust Domain Extensions (TDX) enabling.
These changes are somewhat premature, as full TDX enabling is months away, but the posted interrupts change is (IMO) valuable irrespective of TDX.
The value of the vmx_ops.h rename without TDX is debatable. I have no problem deferring the change to the actual TDX series if there are objections. I'm submitting the patch now as getting the rename upstream will save us minor merge conflict pain if there are changes to vmx/ops.h between now and whenever the TDX enabling series comes along.
https://software.intel.com/content/www/us/en/develop/articles/intel-trust-domain-extensions.html
Sean Christopherson (1):
KVM: VMX: Rename ops.h to vmx_ops.h
Xiaoyao Li (1):
KVM: VMX: Extract posted interrupt support to separate files
arch/x86/kvm/Makefile | 3 +-
arch/x86/kvm/vmx/posted_intr.c | 332 ++++++++++++++++++++++++++
arch/x86/kvm/vmx/posted_intr.h | 99 ++++++++
arch/x86/kvm/vmx/vmx.c | 321 +------------------------
arch/x86/kvm/vmx/vmx.h | 92 +------
arch/x86/kvm/vmx/{ops.h => vmx_ops.h} | 0
6 files changed, 440 insertions(+), 407 deletions(-)
create mode 100644 arch/x86/kvm/vmx/posted_intr.c
create mode 100644 arch/x86/kvm/vmx/posted_intr.h
rename arch/x86/kvm/vmx/{ops.h => vmx_ops.h} (100%)Signature · 1 line
2.28.0
PATCH 2/2 KVM: VMX: Rename ops.h to vmx_ops.h
Rename ops.h to vmx_ops.h to allow adding a tdx_ops.h in the future without causing massive confusion.
Trust Domain Extensions (TDX) is built on VMX, but KVM cannot directly access the VMCS(es) for a TDX guest, thus TDX will need its own "ops" implementation for wrapping the low level operations.
---
arch/x86/kvm/vmx/vmx.c | 1 -
arch/x86/kvm/vmx/vmx.h | 2 +-
arch/x86/kvm/vmx/{ops.h => vmx_ops.h} | 0
3 files changed, 1 insertion(+), 2 deletions(-)
rename arch/x86/kvm/vmx/{ops.h => vmx_ops.h} (100%)arch/x86/kvm/vmx/vmx.c +0 -1
@@ -56,7 +56,6 @@#include "lapic.h" #include "mmu.h" #include "nested.h" -#include "ops.h" #include "pmu.h" #include "trace.h" #include "vmcs.h"
arch/x86/kvm/vmx/vmx.h +1 -1
@@ -9,9 +9,9 @@#include "capabilities.h" #include "kvm_cache_regs.h" -#include "ops.h" #include "posted_intr.h" #include "vmcs.h" +#include "vmx_ops.h" #include "cpuid.h" extern const u32 vmx_msr_index[];
arch/x86/kvm/vmx/vmx_ops.h renamed from arch/x86/kvm/vmx/ops.h +0 -0
Signature · 1 line
2.28.0
Quoted 21 lines · Sean Christopherson
Rename
vmx/ops.htovmx/vmx_ops.h, and move VMX's posted interrupt support to dedicated files in preparation for future Trust Domain Extensions (TDX) enabling.These changes are somewhat premature, as full TDX enabling is months away, but the posted interrupts change is (IMO) valuable irrespective of TDX.
The value of the
vmx_ops.hrename without TDX is debatable. I have no problem deferring the change to the actual TDX series if there are objections. I'm submitting the patch now as getting the rename upstream will save us minor merge conflict pain if there are changes tovmx/ops.hbetween now and whenever the TDX enabling series comes along.https://software.intel.com/content/www/us/en/develop/articles/intel-trust-domain-extensions.html
Sean Christopherson (1):
KVM: VMX: Renameops.htovmx_ops.hXiaoyao Li (1):
KVM: VMX: Extract posted interrupt support to separate files
Quoted 11 lines
arch/x86/kvm/Makefile | 3 +-
arch/x86/kvm/vmx/posted_intr.c | 332 ++++++++++++++++++++++++++
arch/x86/kvm/vmx/posted_intr.h | 99 ++++++++
arch/x86/kvm/vmx/vmx.c | 321 +------------------------
arch/x86/kvm/vmx/vmx.h | 92 +------
arch/x86/kvm/vmx/{ops.h => vmx_ops.h} | 0
6 files changed, 440 insertions(+), 407 deletions(-)
create mode 100644 arch/x86/kvm/vmx/posted_intr.c
create mode 100644 arch/x86/kvm/vmx/posted_intr.h
rename arch/x86/kvm/vmx/{ops.h => vmx_ops.h} (100%)Queued, thanks.
Paolo