diff options
Diffstat (limited to 'arch/x86/include/asm/xen/hypercall.h')
-rw-r--r-- | arch/x86/include/asm/xen/hypercall.h | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h index 7fda040a76cd..d240ea950519 100644 --- a/arch/x86/include/asm/xen/hypercall.h +++ b/arch/x86/include/asm/xen/hypercall.h | |||
@@ -200,6 +200,23 @@ extern struct { char _entry[32]; } hypercall_page[]; | |||
200 | (type)__res; \ | 200 | (type)__res; \ |
201 | }) | 201 | }) |
202 | 202 | ||
203 | static inline long | ||
204 | privcmd_call(unsigned call, | ||
205 | unsigned long a1, unsigned long a2, | ||
206 | unsigned long a3, unsigned long a4, | ||
207 | unsigned long a5) | ||
208 | { | ||
209 | __HYPERCALL_DECLS; | ||
210 | __HYPERCALL_5ARG(a1, a2, a3, a4, a5); | ||
211 | |||
212 | asm volatile("call *%[call]" | ||
213 | : __HYPERCALL_5PARAM | ||
214 | : [call] "a" (&hypercall_page[call]) | ||
215 | : __HYPERCALL_CLOBBER5); | ||
216 | |||
217 | return (long)__res; | ||
218 | } | ||
219 | |||
203 | static inline int | 220 | static inline int |
204 | HYPERVISOR_set_trap_table(struct trap_info *table) | 221 | HYPERVISOR_set_trap_table(struct trap_info *table) |
205 | { | 222 | { |
@@ -270,7 +287,7 @@ HYPERVISOR_fpu_taskswitch(int set) | |||
270 | static inline int | 287 | static inline int |
271 | HYPERVISOR_sched_op(int cmd, void *arg) | 288 | HYPERVISOR_sched_op(int cmd, void *arg) |
272 | { | 289 | { |
273 | return _hypercall2(int, sched_op_new, cmd, arg); | 290 | return _hypercall2(int, sched_op, cmd, arg); |
274 | } | 291 | } |
275 | 292 | ||
276 | static inline long | 293 | static inline long |
@@ -405,10 +422,17 @@ HYPERVISOR_set_segment_base(int reg, unsigned long value) | |||
405 | #endif | 422 | #endif |
406 | 423 | ||
407 | static inline int | 424 | static inline int |
408 | HYPERVISOR_suspend(unsigned long srec) | 425 | HYPERVISOR_suspend(unsigned long start_info_mfn) |
409 | { | 426 | { |
410 | return _hypercall3(int, sched_op, SCHEDOP_shutdown, | 427 | struct sched_shutdown r = { .reason = SHUTDOWN_suspend }; |
411 | SHUTDOWN_suspend, srec); | 428 | |
429 | /* | ||
430 | * For a PV guest the tools require that the start_info mfn be | ||
431 | * present in rdx/edx when the hypercall is made. Per the | ||
432 | * hypercall calling convention this is the third hypercall | ||
433 | * argument, which is start_info_mfn here. | ||
434 | */ | ||
435 | return _hypercall3(int, sched_op, SCHEDOP_shutdown, &r, start_info_mfn); | ||
412 | } | 436 | } |
413 | 437 | ||
414 | static inline int | 438 | static inline int |
@@ -423,6 +447,13 @@ HYPERVISOR_hvm_op(int op, void *arg) | |||
423 | return _hypercall2(unsigned long, hvm_op, op, arg); | 447 | return _hypercall2(unsigned long, hvm_op, op, arg); |
424 | } | 448 | } |
425 | 449 | ||
450 | static inline int | ||
451 | HYPERVISOR_tmem_op( | ||
452 | struct tmem_op *op) | ||
453 | { | ||
454 | return _hypercall1(int, tmem_op, op); | ||
455 | } | ||
456 | |||
426 | static inline void | 457 | static inline void |
427 | MULTI_fpu_taskswitch(struct multicall_entry *mcl, int set) | 458 | MULTI_fpu_taskswitch(struct multicall_entry *mcl, int set) |
428 | { | 459 | { |