[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5c220a51-d956-4434-992b-8f97f8d00922@linux.intel.com>
Date: Thu, 16 Jan 2025 14:30:30 +0800
From: Binbin Wu <binbin.wu@...ux.intel.com>
To: Yan Zhao <yan.y.zhao@...el.com>
Cc: pbonzini@...hat.com, seanjc@...gle.com, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, rick.p.edgecombe@...el.com,
kai.huang@...el.com, adrian.hunter@...el.com, reinette.chatre@...el.com,
xiaoyao.li@...el.com, tony.lindgren@...el.com, dmatlack@...gle.com,
isaku.yamahata@...el.com, isaku.yamahata@...il.com
Subject: Re: [PATCH 5/7] fixup! KVM: TDX: Implement hooks to propagate changes
of TDP MMU mirror page table
On 1/13/2025 10:13 AM, Yan Zhao wrote:
> Return -EBUSY instead of -EAGAIN when tdh_mem_sept_add() encounters any err
> of TDX_OPERAND_BUSY.
>
> Signed-off-by: Yan Zhao <yan.y.zhao@...el.com>
> ---
> arch/x86/kvm/vmx/tdx.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx/tdx.c b/arch/x86/kvm/vmx/tdx.c
> index 09677a4cd605..4fb9faca5db2 100644
> --- a/arch/x86/kvm/vmx/tdx.c
> +++ b/arch/x86/kvm/vmx/tdx.c
> @@ -1740,8 +1740,9 @@ int tdx_sept_link_private_spt(struct kvm *kvm, gfn_t gfn,
>
> err = tdh_mem_sept_add(to_kvm_tdx(kvm)->tdr_pa, gpa, tdx_level, hpa, &entry,
> &level_state);
> - if (unlikely(err == TDX_ERROR_SEPT_BUSY))
> - return -EAGAIN;
> + if (unlikely(err & TDX_OPERAND_BUSY))
Some issue here as mentioned in the previous patch.
> + return -EBUSY;
> +
> if (KVM_BUG_ON(err, kvm)) {
> pr_tdx_error_2(TDH_MEM_SEPT_ADD, err, entry, level_state);
> return -EIO;
Powered by blists - more mailing lists