> VMware's steal-time counter must be in shared memory so the host can > update it. Encrypted guests currently register its address without > decrypting the storage. Move their setup to an early initcall, when the > memory allocator is available for page-table splitting, but before > secondary CPUs start. Leave ordinary guests' setup unchanged. > > Convert every possible CPU's storage before registering any address. > Zero each object after conversion, since its contents may not survive > conversion and the host initializes only the counter. Register the boot > CPU with preemption disabled; the existing hotplug callbacks handle the > others. If conversion or boot-CPU registration fails, attempt to re-encrypt > all affected ranges, including a partially converted failing range, and > disable steal time. > > TDX's conversion path requires directly mapped memory. Check all per-CPU > objects before converting anything, and disable steal time if a TDX guest > uses the page per-CPU allocator, which supplies vmalloc mappings. This > also covers automatic fallback from the embedded allocator. AMD guests > are unaffected by this restriction because their conversion path supports > those mappings. > > Link: > https://lore.kernel.org/r/[email protected] > Co-developed-by: Bo Gan <[email protected]> > Signed-off-by: Bo Gan <[email protected]> > Co-developed-by: Alexey Makhalov <[email protected]> > Signed-off-by: Alexey Makhalov <[email protected]> > Signed-off-by: Zack Rusin <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=2
