Re: [PATCHv2 03/29] x86/tdx: Add __tdx_module_call() and __tdx_hypercall() helper functions

Kai Huang
2022-02-03T23:48:09Z

> > /*
> > * SEAMCALL instruction is essentially a VMExit from VMX root
> > * mode to SEAM VMX root mode. VMfailInvalid (CF=1) indicates
> > * that the targeted SEAM firmware is not loaded or disabled,
> > * or P-SEAMLDR is busy with another SEAMCALL. %rax is not
> > * changed in this case.
> > *
> > * Set %rax to VMFAILINVALID for VMfailInvalid. This value
> > * will never be used as actual SEAMCALL error code.
> > */
> > jnb .Lno_vmfailinvalid
> > mov $(VMFAILINVALID), %rax
> > jmp .Lno_output_struct
> >
> > .Lno_vmfailinvalid:
>
> Okay, I will add it under .if \host.
>
> But maybe use JNC instead of JNB? Since we check for CF flag,
> Jump-if-Not-Carry sounds more reasonable than Jump-if-Not-Below.
> Not-Below of what?

Fine with JNC :)