Re: [PATCH v14 011/113] KVM: TDX: Add C wrapper functions for SEAMCALLs to the TDX module

From: Isaku Yamahata
Date: Thu Jun 01 2023 - 20:15:10 EST


On Thu, Jun 01, 2023 at 01:24:35PM +0000,
"Wang, Wei W" <wei.w.wang@xxxxxxxxx> wrote:

> > diff --git a/arch/x86/kvm/vmx/tdx_ops.h b/arch/x86/kvm/vmx/tdx_ops.h
> > new file mode 100644 index 000000000000..893cc6c25f3b
> > --- /dev/null
> > +++ b/arch/x86/kvm/vmx/tdx_ops.h
> > @@ -0,0 +1,202 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +/* constants/data definitions for TDX SEAMCALLs */
> > +
> > +#ifndef __KVM_X86_TDX_OPS_H
> > +#define __KVM_X86_TDX_OPS_H
> > +
> > +#include <linux/compiler.h>
> > +
> > +#include <asm/cacheflush.h>
> > +#include <asm/asm.h>
> > +#include <asm/kvm_host.h>
> > +
> > +#include "tdx_errno.h"
> > +#include "tdx_arch.h"
> > +#include "x86.h"
> > +
> > +static inline u64 kvm_seamcall(u64 op, u64 rcx, u64 rdx, u64 r8, u64 r9,
> > + struct tdx_module_output *out) {
>
> As discussed somewhere before, kvm_* is more common to be labelled for the
> generic code. Would it be better to be named tdx_seamcall here?

Ok, let's rename it to tdx_seamcall(), that's more consistent in this file.
--
Isaku Yamahata <isaku.yamahata@xxxxxxxxx>