[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ff370e42-f48b-4c62-9b44-9d4031cd78b0@intel.com>
Date: Mon, 22 Jan 2024 08:32:22 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: Alexey Makhalov <alexey.makhalov@...adcom.com>,
linux-kernel@...r.kernel.org, virtualization@...ts.linux.dev, bp@...en8.de,
hpa@...or.com, dave.hansen@...ux.intel.com, mingo@...hat.com,
tglx@...utronix.de
Cc: x86@...nel.org, netdev@...r.kernel.org, richardcochran@...il.com,
linux-input@...r.kernel.org, dmitry.torokhov@...il.com, zackr@...are.com,
linux-graphics-maintainer@...are.com, pv-drivers@...are.com,
namit@...are.com, timothym@...are.com, akaher@...are.com, jsipek@...are.com,
dri-devel@...ts.freedesktop.org, daniel@...ll.ch, airlied@...il.com,
tzimmermann@...e.de, mripard@...nel.org, maarten.lankhorst@...ux.intel.com,
horms@...nel.org, kirill.shutemov@...ux.intel.com
Subject: Re: [PATCH v6 7/7] x86/vmware: Add TDX hypercall support
On 1/9/24 00:40, Alexey Makhalov wrote:
> +#ifdef CONFIG_INTEL_TDX_GUEST
> +unsigned long vmware_tdx_hypercall(unsigned long cmd,
> + struct tdx_module_args *args)
> +{
> + if (!hypervisor_is_type(X86_HYPER_VMWARE))
> + return ULONG_MAX;
> +
> + if (cmd & ~VMWARE_CMD_MASK) {
> + pr_warn_once("Out of range command %lx\n", cmd);
> + return ULONG_MAX;
> + }
> +
> + args->r10 = VMWARE_TDX_VENDOR_LEAF;
> + args->r11 = VMWARE_TDX_HCALL_FUNC;
> + args->r12 = VMWARE_HYPERVISOR_MAGIC;
> + args->r13 = cmd;
> + args->r15 = 0; /* CPL */
> +
> + __tdx_hypercall(args);
> +
> + return args->r12;
> +}
> +EXPORT_SYMBOL_GPL(vmware_tdx_hypercall);
> +#endif
This is the kind of wrapper that I was hoping for. Thanks.
Acked-by: Dave Hansen <dave.hansen@...ux.intel.com>
Powered by blists - more mailing lists