@@ -72,10 +72,16 @@ static inline u64 hv_do_hypercall(u64 control, void *input, void *output)
72
72
return hv_status ;
73
73
}
74
74
75
+ /* Hypercall to the L0 hypervisor */
76
+ static inline u64 hv_do_nested_hypercall (u64 control , void * input , void * output )
77
+ {
78
+ return hv_do_hypercall (control | HV_HYPERCALL_NESTED , input , output );
79
+ }
80
+
75
81
/* Fast hypercall with 8 bytes of input and no output */
76
- static inline u64 hv_do_fast_hypercall8 ( u16 code , u64 input1 )
82
+ static inline u64 _hv_do_fast_hypercall8 ( u64 control , u64 input1 )
77
83
{
78
- u64 hv_status , control = ( u64 ) code | HV_HYPERCALL_FAST_BIT ;
84
+ u64 hv_status ;
79
85
80
86
#ifdef CONFIG_X86_64
81
87
{
@@ -103,10 +109,24 @@ static inline u64 hv_do_fast_hypercall8(u16 code, u64 input1)
103
109
return hv_status ;
104
110
}
105
111
112
+ static inline u64 hv_do_fast_hypercall8 (u16 code , u64 input1 )
113
+ {
114
+ u64 control = (u64 )code | HV_HYPERCALL_FAST_BIT ;
115
+
116
+ return _hv_do_fast_hypercall8 (control , input1 );
117
+ }
118
+
119
+ static inline u64 hv_do_fast_nested_hypercall8 (u16 code , u64 input1 )
120
+ {
121
+ u64 control = (u64 )code | HV_HYPERCALL_FAST_BIT | HV_HYPERCALL_NESTED ;
122
+
123
+ return _hv_do_fast_hypercall8 (control , input1 );
124
+ }
125
+
106
126
/* Fast hypercall with 16 bytes of input */
107
- static inline u64 hv_do_fast_hypercall16 ( u16 code , u64 input1 , u64 input2 )
127
+ static inline u64 _hv_do_fast_hypercall16 ( u64 control , u64 input1 , u64 input2 )
108
128
{
109
- u64 hv_status , control = ( u64 ) code | HV_HYPERCALL_FAST_BIT ;
129
+ u64 hv_status ;
110
130
111
131
#ifdef CONFIG_X86_64
112
132
{
@@ -137,6 +157,20 @@ static inline u64 hv_do_fast_hypercall16(u16 code, u64 input1, u64 input2)
137
157
return hv_status ;
138
158
}
139
159
160
+ static inline u64 hv_do_fast_hypercall16 (u16 code , u64 input1 , u64 input2 )
161
+ {
162
+ u64 control = (u64 )code | HV_HYPERCALL_FAST_BIT ;
163
+
164
+ return _hv_do_fast_hypercall16 (control , input1 , input2 );
165
+ }
166
+
167
+ static inline u64 hv_do_fast_nested_hypercall16 (u16 code , u64 input1 , u64 input2 )
168
+ {
169
+ u64 control = (u64 )code | HV_HYPERCALL_FAST_BIT | HV_HYPERCALL_NESTED ;
170
+
171
+ return _hv_do_fast_hypercall16 (control , input1 , input2 );
172
+ }
173
+
140
174
extern struct hv_vp_assist_page * * hv_vp_assist_page ;
141
175
142
176
static inline struct hv_vp_assist_page * hv_get_vp_assist_page (unsigned int cpu )
0 commit comments