lkml.org 
[lkml]   [2022]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCHv7 14/14] x86/tdx: Add unaccepted memory support
From
On 6/14/22 05:02, Kirill A. Shutemov wrote:
> static inline void __accept_memory(phys_addr_t start, phys_addr_t end)
> {
> /* Platform-specific memory-acceptance call goes here */
> - error("Cannot accept memory");
> + if (is_tdx_guest())
> + tdx_accept_memory(start, end);
> + else
> + error("Cannot accept memory: unknown platform\n");
> }

There are quite a few of these

if (tdx())
...

conditions in common code here. Shouldn't this be something like a
CC_ATTR_MEM_ACCEPT?

if (cc_platform_has(CC_ATTR_MEM_ACCEPT))
cc_accept_memory(...);
else
error("Cannot accept memory: unknown platform\n");

I understand that TDX is the first one to the party. Is this the time
to add the cc_ infrastructure?

\
 
 \ /
  Last update: 2022-06-24 18:23    [W:0.980 / U:6.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site