mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/arm: support VCPUOP_register_vcpu_info.
We don't want to support the full vcpu_op hypercall interface, just VCPUOP_register_vcpu_info: introduce an internal ARM-only do_arm_vcpu_op function to filter out the vcpu_op hypercalls that we don't want to support. Call do_arm_vcpu_op instead of do_vcpu_op from traps.c. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
6ff9e4f743
commit
66410d1d18
3 files changed
+21
No files matched your search
@@ -10,6 +10,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
#include <xen/config.h>
|
||||
#include <xen/hypercall.h>
|
||||
#include <xen/init.h>
|
||||
#include <xen/lib.h>
|
||||
#include <xen/sched.h>
|
||||
@@ -629,6 +630,18 @@ void arch_dump_domain_info(struct domain *d)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
long do_arm_vcpu_op(int cmd, int vcpuid, XEN_GUEST_HANDLE_PARAM(void) arg)
|
||||
{
|
||||
switch ( cmd )
|
||||
{
|
||||
case VCPUOP_register_vcpu_info:
|
||||
return do_vcpu_op(cmd, vcpuid, arg);
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
long arch_do_vcpu_op(int cmd, struct vcpu *v, XEN_GUEST_HANDLE_PARAM(void) arg)
|
||||
{
|
||||
return -ENOSYS;
|
||||
|
||||
@@ -653,6 +653,11 @@ typedef struct {
|
||||
.nr_args = _nr_args, \
|
||||
}
|
||||
|
||||
#define HYPERCALL_ARM(_name, _nr_args) \
|
||||
[ __HYPERVISOR_ ## _name ] = { \
|
||||
.fn = (arm_hypercall_fn_t) &do_arm_ ## _name, \
|
||||
.nr_args = _nr_args, \
|
||||
}
|
||||
static arm_hypercall_t arm_hypercall_table[] = {
|
||||
HYPERCALL(memory_op, 2),
|
||||
HYPERCALL(domctl, 1),
|
||||
@@ -665,6 +670,7 @@ static arm_hypercall_t arm_hypercall_table[] = {
|
||||
HYPERCALL(sysctl, 2),
|
||||
HYPERCALL(hvm_op, 2),
|
||||
HYPERCALL(grant_table_op, 3),
|
||||
HYPERCALL_ARM(vcpu_op, 3),
|
||||
};
|
||||
|
||||
#define __PSCI_cpu_suspend 0
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include <public/domctl.h> /* for arch_do_domctl */
|
||||
int do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg);
|
||||
|
||||
long do_arm_vcpu_op(int cmd, int vcpuid, XEN_GUEST_HANDLE_PARAM(void) arg);
|
||||
|
||||
#endif /* __ASM_ARM_HYPERCALL_H__ */
|
||||
/*
|
||||
* Local variables:
|
||||
|
||||