The event_channel_op hypercall uses a newer API since
__XEN_INTERFACE_VERSION__ 0x00030202 Since hvm_op only supports event_channel_op via the newer API, we can't get away with our current event_channel_op_compat shim. We thus introduce the new API to our internal hypercall C API interface. This change should have no effect on the PV kernels, since they will continue to use the pre 0x00030202 API.
This commit is contained in:
parent
c55fd1a555
commit
8b9c2e1032
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hypercalls.h,v 1.9 2019/01/24 04:11:38 cherry Exp $ */
|
||||
/* $NetBSD: hypercalls.h,v 1.10 2019/01/24 04:16:16 cherry Exp $ */
|
||||
/******************************************************************************
|
||||
* hypercall.h
|
||||
*
|
||||
|
@ -242,9 +242,14 @@ HYPERVISOR_update_va_mapping(
|
|||
}
|
||||
|
||||
static inline int
|
||||
HYPERVISOR_event_channel_op(void *op)
|
||||
HYPERVISOR_event_channel_op(evtchn_op_t *op)
|
||||
{
|
||||
KASSERT(op != NULL);
|
||||
#if __XEN_INTERFACE_VERSION__ < 0x00030202
|
||||
return _hypercall1(int, event_channel_op, op);
|
||||
#else
|
||||
return _hypercall2(int, event_channel_op, op->cmd, &op->u);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hypercalls.h,v 1.16 2018/07/26 17:20:08 maxv Exp $ */
|
||||
/* $NetBSD: hypercalls.h,v 1.17 2019/01/24 04:16:16 cherry Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Manuel Bouyer.
|
||||
|
@ -457,14 +457,20 @@ HYPERVISOR_multicall(void *call_list, int nr_calls)
|
|||
|
||||
|
||||
static __inline int
|
||||
HYPERVISOR_event_channel_op(void *op)
|
||||
HYPERVISOR_event_channel_op(evtchn_op_t *op)
|
||||
{
|
||||
int ret;
|
||||
unsigned long ign1;
|
||||
|
||||
#if __XEN_INTERFACE_VERSION__ < 0x00030202
|
||||
_hypercall(__HYPERVISOR_event_channel_op, _harg("1" (op)),
|
||||
_harg("=a" (ret), "=b" (ign1)));
|
||||
#else
|
||||
unsigned long ign2;
|
||||
|
||||
_hypercall(__HYPERVISOR_event_channel_op, _harg("1" (op->cmd), "2" (&op->u)),
|
||||
_harg("=a" (ret), "=b" (ign1), "=c" (ign2)));
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue