/******************************************************************************1* hypercall.h2*3* Linux-specific hypervisor handling.4*5* Stefano Stabellini <[email protected]>, Citrix, 20126*7* This program is free software; you can redistribute it and/or8* modify it under the terms of the GNU General Public License version 29* as published by the Free Software Foundation; or, when distributed10* separately from the Linux kernel or incorporated into other11* software packages, subject to the following license:12*13* Permission is hereby granted, free of charge, to any person obtaining a copy14* of this source file (the "Software"), to deal in the Software without15* restriction, including without limitation the rights to use, copy, modify,16* merge, publish, distribute, sublicense, and/or sell copies of the Software,17* and to permit persons to whom the Software is furnished to do so, subject to18* the following conditions:19*20* The above copyright notice and this permission notice shall be included in21* all copies or substantial portions of the Software.22*23* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR24* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,25* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE26* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER27* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING28* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS29* IN THE SOFTWARE.30*/3132#ifndef _ASM_ARM_XEN_HYPERCALL_H33#define _ASM_ARM_XEN_HYPERCALL_H3435#include <linux/bug.h>3637#include <xen/interface/xen.h>38#include <xen/interface/sched.h>39#include <xen/interface/platform.h>4041struct xen_dm_op_buf;4243long privcmd_call(unsigned call, unsigned long a1,44unsigned long a2, unsigned long a3,45unsigned long a4, unsigned long a5);46int HYPERVISOR_xen_version(int cmd, void *arg);47int HYPERVISOR_console_io(int cmd, int count, char *str);48int HYPERVISOR_grant_table_op(unsigned int cmd, void *uop, unsigned int count);49int HYPERVISOR_sched_op(int cmd, void *arg);50int HYPERVISOR_event_channel_op(int cmd, void *arg);51unsigned long HYPERVISOR_hvm_op(int op, void *arg);52int HYPERVISOR_memory_op(unsigned int cmd, void *arg);53int HYPERVISOR_physdev_op(int cmd, void *arg);54int HYPERVISOR_vcpu_op(int cmd, int vcpuid, void *extra_args);55int HYPERVISOR_vm_assist(unsigned int cmd, unsigned int type);56int HYPERVISOR_dm_op(domid_t domid, unsigned int nr_bufs,57struct xen_dm_op_buf *bufs);58int HYPERVISOR_platform_op_raw(void *arg);59static inline int HYPERVISOR_platform_op(struct xen_platform_op *op)60{61op->interface_version = XENPF_INTERFACE_VERSION;62return HYPERVISOR_platform_op_raw(op);63}64int HYPERVISOR_multicall(struct multicall_entry *calls, uint32_t nr);6566static inline int67HYPERVISOR_suspend(unsigned long start_info_mfn)68{69struct sched_shutdown r = { .reason = SHUTDOWN_suspend };7071/* start_info_mfn is unused on ARM */72return HYPERVISOR_sched_op(SCHEDOP_shutdown, &r);73}7475#endif /* _ASM_ARM_XEN_HYPERCALL_H */767778