public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
To: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "Zhao, Yan Y" <yan.y.zhao@intel.com>,
	"Huang, Kai" <kai.huang@intel.com>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>
Subject: Re: [PATCH v3 00/14] x86/virt/tdx: Add SEAMCALL wrappers for KVM
Date: Thu, 16 Jan 2025 22:11:02 +0000	[thread overview]
Message-ID: <90fdbf67cd7d7207d0fe6eaa8339cdb4449a227f.camel@intel.com> (raw)
In-Reply-To: <e4b2c596-a2a9-496b-8875-4f73ddcfcf26@redhat.com>

On Wed, 2025-01-15 at 20:36 +0100, Paolo Bonzini wrote:
> On 1/15/25 20:14, Edgecombe, Rick P wrote:
> > It looks like you missed these build issues and bugs from v2:
> > https://lore.kernel.org/ 
> > kvm/6345272506c5bc707f11b6f54c4bd5015cedcd95.camel@intel.com/
> > https://lore.kernel.org/ 
> > kvm/3f8fa8fc98b532add1ff14034c0c868cdbeca7f8.camel@intel.com/
> 
> I did, I'll update tomorrow and repost.

Hey, one more thing, we've been seeing some compiler sensitive warnings about
stack frame size in init_tdx_module() in the latest kvm-coco-queue. The struct
tdx_sys_info is the main stack allocated variable in that function.

In this commit (x86/virt/tdx: Read essential global metadata for KVM), struct
tdx_sys_info gets expanded a huge amount:
https://git.kernel.org/pub/scm/virt/kvm/kvm.git/commit/?h=kvm-coco-queue&id=6691a42a26844247526ed08aa21ee748a949c408


And in this later commit(KVM: VMX: Initialize TDX during KVM module load), the
stack allocated variable is moved to a static allocation:
https://git.kernel.org/pub/scm/virt/kvm/kvm.git/commit/?h=kvm-coco-queue&id=34f786697b382750739f8c4e13ebb3da348c307c

So the move of the arch/x86 patches earlier opens up a window where, depending
on compiler optimizations, the stack size may be 3304 and trigger
CONFIG_FRAME_WARN related errors.

The solution could be to move the "arch/x86/virt/vmx/tdx/tdx.c" related changes
in the second patch to a separate patch and put it before the first one, or swap
the order of the two patches. These changes are before the VM/vCPU creation
patches, so I think that would be your area. But let me know if you want to get
a bigger posting back from us to include it all.

      parent reply	other threads:[~2025-01-16 22:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-15 16:08 [PATCH v3 00/14] x86/virt/tdx: Add SEAMCALL wrappers for KVM Paolo Bonzini
2025-01-15 16:08 ` [PATCH v3 01/14] x86/virt/tdx: Add SEAMCALL wrappers for TDX KeyID management Paolo Bonzini
2025-01-15 16:09 ` [PATCH v3 02/14] x86/virt/tdx: Add SEAMCALL wrappers for TDX TD creation Paolo Bonzini
2025-01-15 16:09 ` [PATCH v3 03/14] x86/virt/tdx: Add SEAMCALL wrappers for TDX vCPU creation Paolo Bonzini
2025-01-15 16:09 ` [PATCH v3 04/14] x86/virt/tdx: Add SEAMCALL wrappers for TDX page cache management Paolo Bonzini
2025-01-15 16:38   ` Dave Hansen
2025-01-15 16:09 ` [PATCH v3 05/14] x86/virt/tdx: Add SEAMCALL wrappers for TDX VM/vCPU field access Paolo Bonzini
2025-01-15 16:09 ` [PATCH v3 06/14] x86/virt/tdx: Add SEAMCALL wrappers for TDX flush operations Paolo Bonzini
2025-01-15 16:09 ` [PATCH v3 07/14] x86/virt/tdx: Add SEAMCALL wrapper tdh_mem_sept_add() to add SEPT pages Paolo Bonzini
2025-01-15 16:09 ` [PATCH v3 08/14] x86/virt/tdx: Add SEAMCALL wrappers to add TD private pages Paolo Bonzini
2025-01-15 16:09 ` [PATCH v3 09/14] x86/virt/tdx: Add SEAMCALL wrappers to manage TDX TLB tracking Paolo Bonzini
2025-01-15 16:09 ` [PATCH v3 10/14] x86/virt/tdx: Add SEAMCALL wrappers to remove a TD private page Paolo Bonzini
2025-01-15 16:09 ` [PATCH v3 11/14] x86/virt/tdx: Add SEAMCALL wrappers for TD measurement of initial contents Paolo Bonzini
2025-01-15 16:09 ` [PATCH v3 12/14] x86/virt/tdx: Add SEAMCALL wrapper to enter/exit TDX guest Paolo Bonzini
2025-01-15 17:14   ` Adrian Hunter
2025-01-15 16:09 ` [PATCH v3 13/14] x86/virt/tdx: Read essential global metadata for KVM Paolo Bonzini
2025-01-15 16:09 ` [PATCH v3 14/14] x86/virt/tdx: Add tdx_guest_keyid_alloc/free() to alloc and free TDX guest KeyID Paolo Bonzini
2025-01-15 16:39 ` [PATCH v3 00/14] x86/virt/tdx: Add SEAMCALL wrappers for KVM Dave Hansen
2025-01-15 19:14 ` Edgecombe, Rick P
2025-01-15 19:36   ` Paolo Bonzini
2025-01-15 20:06     ` Edgecombe, Rick P
2025-01-16 22:11     ` Edgecombe, Rick P [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=90fdbf67cd7d7207d0fe6eaa8339cdb4449a227f.camel@intel.com \
    --to=rick.p.edgecombe@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=kai.huang@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=yan.y.zhao@intel.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