[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a2b2bf58-0d6b-4f27-999b-d9b40ae34ce8@linux.intel.com>
Date: Tue, 3 Dec 2024 10:33:23 +0800
From: Binbin Wu <binbin.wu@...ux.intel.com>
To: Rick Edgecombe <rick.p.edgecombe@...el.com>
Cc: kvm@...r.kernel.org, pbonzini@...hat.com, seanjc@...gle.com,
dave.hansen@...el.com, isaku.yamahata@...il.com, kai.huang@...el.com,
linux-kernel@...r.kernel.org, tony.lindgren@...ux.intel.com,
xiaoyao.li@...el.com, yan.y.zhao@...el.com, x86@...nel.org,
adrian.hunter@...el.com, Isaku Yamahata <isaku.yamahata@...el.com>,
Yuan Yao <yuan.yao@...el.com>
Subject: Re: [RFC PATCH v2 4/6] x86/virt/tdx: Add SEAMCALL wrappers for TDX
page cache management
On 12/3/2024 9:03 AM, Rick Edgecombe wrote:
[...]
> +
> +/*
> + * TDX ABI defines output operands as PT, OWNER and SIZE. These are TDX defined fomats.
fomats -> formats
> + * So despite the names, they must be interpted specially as described by the spec. Return
interpted -> interpreted
> + * them only for error reporting purposes.
> + */
> +u64 tdh_phymem_page_reclaim(struct page *page, u64 *tdx_pt, u64 *tdx_owner, u64 *tdx_size)
> +{
> + struct tdx_module_args args = {
> + .rcx = page_to_pfn(page) << PAGE_SHIFT,
> + };
> + u64 ret;
> +
> + ret = seamcall_ret(TDH_PHYMEM_PAGE_RECLAIM, &args);
> +
> + *tdx_pt = args.rcx;
> + *tdx_owner = args.rdx;
> + *tdx_size = args.r8;
> +
> + return ret;
> +}
> +EXPORT_SYMBOL_GPL(tdh_phymem_page_reclaim);
> +
[...]
Powered by blists - more mailing lists