[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1cbf706a7daa837bb755188cf42869c5424f4a18.camel@intel.com>
Date: Fri, 20 Jun 2025 18:59:20 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "Hunter, Adrian" <adrian.hunter@...el.com>, "seanjc@...gle.com"
<seanjc@...gle.com>
CC: "Gao, Chao" <chao.gao@...el.com>, "Huang, Kai" <kai.huang@...el.com>,
"binbin.wu@...ux.intel.com" <binbin.wu@...ux.intel.com>, "Annapurve, Vishal"
<vannapurve@...gle.com>, "Chatre, Reinette" <reinette.chatre@...el.com>, "Li,
Xiaoyao" <xiaoyao.li@...el.com>, "kirill.shutemov@...ux.intel.com"
<kirill.shutemov@...ux.intel.com>, "tony.lindgren@...ux.intel.com"
<tony.lindgren@...ux.intel.com>, "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"pbonzini@...hat.com" <pbonzini@...hat.com>, "Yamahata, Isaku"
<isaku.yamahata@...el.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "Zhao, Yan Y" <yan.y.zhao@...el.com>
Subject: Re: [PATCH V4 1/1] KVM: TDX: Add sub-ioctl KVM_TDX_TERMINATE_VM
On Fri, 2025-06-20 at 07:24 -0700, Sean Christopherson wrote:
> > The patch was tested with QEMU which AFAICT does not touch memslots when
> > shutting down. Is there a reason to?
>
> In this case, the VMM process is not shutting down. To emulate a reboot, the
> VMM destroys the VM, but reuses the guest_memfd files for the "new" VM.
> Because guest_memfd takes a reference to "struct kvm", through memslot
> bindings, memslots need to be manually destroyed so that all references are
> put and the VM is freed by the kernel.
Sorry if I'm being dumb, but why does it do this? It saves freeing/allocating
the guestmemfd pages? Or the in-place data gets reused somehow?
The series Vishal linked has some kind of SEV state transfer thing. How is it
intended to work for TDX?
> E.g. otherwise multiple reboots would manifest as memory leakds and
> eventually OOM the host.
This is in the case of future guestmemfd functionality? Or today?
Powered by blists - more mailing lists