kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: VMX: Super early file refactor for TDX
@ 2020-09-23 18:31 Sean Christopherson
  2020-09-23 18:31 ` [PATCH 2/2] KVM: VMX: Rename ops.h to vmx_ops.h Sean Christopherson
  2020-09-25 21:07 ` [PATCH 0/2] KVM: VMX: Super early file refactor for TDX Paolo Bonzini
  0 siblings, 2 replies; 3+ messages in thread
From: Sean Christopherson @ 2020-09-23 18:31 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Sean Christopherson, Vitaly Kuznetsov, Wanpeng Li, Jim Mattson,
	Joerg Roedel, kvm, linux-kernel, Xiaoyao Li

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%)

-- 
2.28.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] KVM: VMX: Rename ops.h to vmx_ops.h
  2020-09-23 18:31 [PATCH 0/2] KVM: VMX: Super early file refactor for TDX Sean Christopherson
@ 2020-09-23 18:31 ` Sean Christopherson
  2020-09-25 21:07 ` [PATCH 0/2] KVM: VMX: Super early file refactor for TDX Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Sean Christopherson @ 2020-09-23 18:31 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Sean Christopherson, Vitaly Kuznetsov, Wanpeng Li, Jim Mattson,
	Joerg Roedel, kvm, linux-kernel, Xiaoyao Li

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.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 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%)

diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 6d5bd5bd7165..8416b7a27f3f 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -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"
diff --git a/arch/x86/kvm/vmx/vmx.h b/arch/x86/kvm/vmx/vmx.h
index ab7d5e000a91..4769a086ad50 100644
--- a/arch/x86/kvm/vmx/vmx.h
+++ b/arch/x86/kvm/vmx/vmx.h
@@ -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[];
diff --git a/arch/x86/kvm/vmx/ops.h b/arch/x86/kvm/vmx/vmx_ops.h
similarity index 100%
rename from arch/x86/kvm/vmx/ops.h
rename to arch/x86/kvm/vmx/vmx_ops.h
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/2] KVM: VMX: Super early file refactor for TDX
  2020-09-23 18:31 [PATCH 0/2] KVM: VMX: Super early file refactor for TDX Sean Christopherson
  2020-09-23 18:31 ` [PATCH 2/2] KVM: VMX: Rename ops.h to vmx_ops.h Sean Christopherson
@ 2020-09-25 21:07 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2020-09-25 21:07 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: Vitaly Kuznetsov, Wanpeng Li, Jim Mattson, Joerg Roedel, kvm,
	linux-kernel, Xiaoyao Li

On 23/09/20 20:31, Sean Christopherson wrote:
> 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%)
> 

Queued, thanks.

Paolo


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-25 21:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-23 18:31 [PATCH 0/2] KVM: VMX: Super early file refactor for TDX Sean Christopherson
2020-09-23 18:31 ` [PATCH 2/2] KVM: VMX: Rename ops.h to vmx_ops.h Sean Christopherson
2020-09-25 21:07 ` [PATCH 0/2] KVM: VMX: Super early file refactor for TDX Paolo Bonzini

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).