On 12/8/2022 9:32 PM, Jinank Jain wrote: > /* Fast hypercall with 8 bytes of input and no output */ > -static inline u64 hv_do_fast_hypercall8(u16 code, u64 input1) > +static inline u64 _hv_do_fast_hypercall8(u64 control, u16 code, u64 input1) > { > - u64 hv_status, control = (u64)code | HV_HYPERCALL_FAST_BIT; > + u64 hv_status; The parameter 'code' seems to be unused in this function now. Can we just replace it with 'control'? > > #ifdef CONFIG_X86_64 > { > @@ -105,10 +111,24 @@ static inline u64 hv_do_fast_hypercall8(u16 code, u64 input1) > return hv_status; > } > > +static inline u64 hv_do_fast_hypercall8(u16 code, u64 input1) > +{ > + u64 control = (u64)code | HV_HYPERCALL_FAST_BIT; > + > + return _hv_do_fast_hypercall8(control, code, input1); > +} > + > +static inline u64 hv_do_fast_nested_hypercall8(u16 code, u64 input1) > +{ > + u64 control = (u64)code | HV_HYPERCALL_FAST_BIT | HV_HYPERCALL_NESTED; > + > + return _hv_do_fast_hypercall8(control, code, input1); > +} > + > /* Fast hypercall with 16 bytes of input */ > -static inline u64 hv_do_fast_hypercall16(u16 code, u64 input1, u64 input2) > +static inline u64 _hv_do_fast_hypercall16(u64 control, u16 code, u64 input1, u64 input2) > { > - u64 hv_status, control = (u64)code | HV_HYPERCALL_FAST_BIT; > + u64 hv_status; Ditto > > #ifdef CONFIG_X86_64 > { > @@ -139,6 +159,20 @@ static inline u64 hv_do_fast_hypercall16(u16 code, u64 input1, u64 input2) > return hv_status; > } > > +static inline u64 hv_do_fast_hypercall16(u16 code, u64 input1, u64 input2) > +{ > + u64 control = (u64)code | HV_HYPERCALL_FAST_BIT; > + > + return _hv_do_fast_hypercall16(control, code, input1, input2); > +} > + > +static inline u64 hv_do_fast_nested_hypercall16(u16 code, u64 input1, u64 input2) > +{ > + u64 control = (u64)code | HV_HYPERCALL_FAST_BIT | HV_HYPERCALL_NESTED; > + > + return _hv_do_fast_hypercall16(control, code, input1, input2); > +}