[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eca40f3f7a376661107cfd8cf62c6c9e7705bd3a.camel@intel.com>
Date: Wed, 4 Sep 2024 16:09:58 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "kvm@...r.kernel.org" <kvm@...r.kernel.org>, "pbonzini@...hat.com"
<pbonzini@...hat.com>, "Hunter, Adrian" <adrian.hunter@...el.com>,
"seanjc@...gle.com" <seanjc@...gle.com>
CC: "Zhao, Yan Y" <yan.y.zhao@...el.com>, "nik.borisov@...e.com"
<nik.borisov@...e.com>, "dmatlack@...gle.com" <dmatlack@...gle.com>, "Huang,
Kai" <kai.huang@...el.com>, "isaku.yamahata@...il.com"
<isaku.yamahata@...il.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 20/21] KVM: TDX: Finalize VM initialization
On Wed, 2024-09-04 at 18:37 +0300, Adrian Hunter wrote:
>
> Isaku was going to lock the mmu. Seems like the change got lost.
> To protect against racing with KVM_PRE_FAULT_MEMORY,
> KVM_TDX_INIT_MEM_REGION, tdx_sept_set_private_spte() etc
> e.g. Rename tdx_td_finalizemr to __tdx_td_finalizemr and add:
>
> static int tdx_td_finalizemr(struct kvm *kvm, struct kvm_tdx_cmd *cmd)
> {
> int ret;
>
> write_lock(&kvm->mmu_lock);
> ret = __tdx_td_finalizemr(kvm, cmd);
> write_unlock(&kvm->mmu_lock);
>
> return ret;
> }
Makes sense. Thanks.
Powered by blists - more mailing lists