aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/include
diff options
context:
space:
mode:
authorElliott Mitchell <ehem+freebsd@m5p.com>2022-03-27 22:10:24 +0000
committerRoger Pau Monné <royger@FreeBSD.org>2023-04-14 13:58:48 +0000
commitecdcad6516c9a911a701e362f23a9d2643a6d7d0 (patch)
tree0062361a98f7803b5806e0930d751b9be31d1d38 /sys/amd64/include
parent61ccede8cf6cc1442ce531fe28c25fd000263fb5 (diff)
Diffstat (limited to 'sys/amd64/include')
-rw-r--r--sys/amd64/include/xen/hypercall.h58
1 files changed, 3 insertions, 55 deletions
diff --git a/sys/amd64/include/xen/hypercall.h b/sys/amd64/include/xen/hypercall.h
index 60da390ef4c6..c561d1b84bd6 100644
--- a/sys/amd64/include/xen/hypercall.h
+++ b/sys/amd64/include/xen/hypercall.h
@@ -49,8 +49,6 @@ extern char *hypercall_page;
#define __STR(x) #x
#define STR(x) __STR(x)
-#define ENOXENSYS 38
-#define CONFIG_XEN_COMPAT 0x030002
#define __must_check
#define HYPERCALL_STR(name) \
@@ -213,13 +211,6 @@ HYPERVISOR_fpu_taskswitch(
}
static inline int __must_check
-HYPERVISOR_sched_op_compat(
- int cmd, unsigned long arg)
-{
- return _hypercall2(int, sched_op_compat, cmd, arg);
-}
-
-static inline int __must_check
HYPERVISOR_sched_op(
int cmd, void *arg)
{
@@ -287,19 +278,7 @@ static inline int __must_check
HYPERVISOR_event_channel_op(
int cmd, void *arg)
{
- int rc = _hypercall2(int, event_channel_op, cmd, arg);
-
-#if CONFIG_XEN_COMPAT <= 0x030002
- if (__predict_false(rc == -ENOXENSYS)) {
- struct evtchn_op op;
- op.cmd = cmd;
- memcpy(&op.u, arg, sizeof(op.u));
- rc = _hypercall1(int, event_channel_op_compat, &op);
- memcpy(arg, &op.u, sizeof(op.u));
- }
-#endif
-
- return rc;
+ return _hypercall2(int, event_channel_op, cmd, arg);
}
static inline int __must_check
@@ -320,19 +299,7 @@ static inline int __must_check
HYPERVISOR_physdev_op(
int cmd, void *arg)
{
- int rc = _hypercall2(int, physdev_op, cmd, arg);
-
-#if CONFIG_XEN_COMPAT <= 0x030002
- if (__predict_false(rc == -ENOXENSYS)) {
- struct physdev_op op;
- op.cmd = cmd;
- memcpy(&op.u, arg, sizeof(op.u));
- rc = _hypercall1(int, physdev_op_compat, &op);
- memcpy(arg, &op.u, sizeof(op.u));
- }
-#endif
-
- return rc;
+ return _hypercall2(int, physdev_op, cmd, arg);
}
static inline int __must_check
@@ -379,35 +346,16 @@ HYPERVISOR_suspend(
.reason = SHUTDOWN_suspend
};
- int rc = _hypercall3(int, sched_op, SCHEDOP_shutdown,
+ return _hypercall3(int, sched_op, SCHEDOP_shutdown,
&sched_shutdown, srec);
-
-#if CONFIG_XEN_COMPAT <= 0x030002
- if (rc == -ENOXENSYS)
- rc = _hypercall3(int, sched_op_compat, SCHEDOP_shutdown,
- SHUTDOWN_suspend, srec);
-#endif
-
- return rc;
}
-#if CONFIG_XEN_COMPAT <= 0x030002
-static inline int
-HYPERVISOR_nmi_op(
- unsigned long op, void *arg)
-{
- return _hypercall2(int, nmi_op, op, arg);
-}
-#endif
-
-#ifndef CONFIG_XEN
static inline unsigned long __must_check
HYPERVISOR_hvm_op(
int op, void *arg)
{
return _hypercall2(unsigned long, hvm_op, op, arg);
}
-#endif
static inline int __must_check
HYPERVISOR_callback_op(