RE: [PATCH 5/6] x86/hyperv: Support hypercalls for TDX guests
From: Dexuan Cui
Date: Sun Nov 27 2022 - 20:36:35 EST
> From: Michael Kelley (LINUX) <mikelley@xxxxxxxxxxxxx>
> Sent: Sunday, November 27, 2022 5:21 PM
> > [...]
> > +u64 hv_tdx_hypercall(u64 control, u64 input_addr, u64 output_addr)
> > +{
> > + struct tdx_hypercall_args args = { };
> > +
> > + if (!(control & HV_HYPERCALL_FAST_BIT)) {
> > + if (input_addr)
> > + input_addr += ms_hyperv.shared_gpa_boundary;
>
> At one point when working with the vTOM code, I realized that or'ing in
> the shared_gpa_boundary is probably safer than add'ing it, just in case
> the physical address already has vTOM set. I don't know if that possibility
> exists here, but it's something to consider as being slightly more robust.
>
> > +
> > + if (output_addr)
> > + output_addr += ms_hyperv.shared_gpa_boundary;
>
> Same here.
Ok, will use |= in all the reference.