> From: Alexey Makhalov <[email protected]>
> 
> The low-bandwidth wrappers duplicate inline assembly for the backdoor,
> vmcall and vmmcall paths, and each repeats the TDX check. The early boot
> path also needs a separate dispatcher until alternatives have been
> patched.
> 
> Move the assembly into four backends selected by a static call. Pass the
> command with input and result structures instead of ten arguments with
> nullable output pointers, as suggested by Linus. Keep the existing wrapper
> API for callers.
> 
> The backdoor remains the link-time target for early DMI probing. TDX
> guests cannot use its I/O port, so it forwards them to the TDX backend,
> which still rejects other hypervisors such as KVM. Each backend fills
> the complete result structure. The backdoor replaces the low 16 bits of
> %edx with its port; vmcall, vmmcall and TDX preserve them. Export only
> the GPL trampoline so modules can call it but cannot retarget it.
> 
> The selected static call also makes vmware_hypercall_slow() obsolete.
> Remove it in the same change so no runtime code refers to the init-only
> mode byte. Print the selected backend by name instead of its numeric mode.
> 
> Suggested-by: Linus Torvalds <[email protected]>
> Signed-off-by: Alexey Makhalov <[email protected]>
> Co-developed-by: Zack Rusin <[email protected]>
> Signed-off-by: Zack Rusin <[email protected]>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=2


Reply via email to