From nobody Fri Apr 14 14:00:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PydQD2vP7z45JSJ; Fri, 14 Apr 2023 14:00:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PydQD1MGPz3JwX; Fri, 14 Apr 2023 14:00:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681480852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pVVsojSJg8tBd4teUxHf2Wz9tYggH63alEBWGmGSOP4=; b=onmKkJ7k/Y700/2o0lEbx/PTS4yOlndcAj9qdDfD8ICEWzH7q7jJfwYqhhTatQkiQx0LVY ymiPFryoObR+Lcn0EC6TL1aR74hdQwYeD3spmzJg1VmHkwVf2K2OybEHc4uuKfsijBxE9Z RxLIt7cOHsMwBtYeSeh0PcI3+F62LgEsT8kgnG733GhwclE+LqS9jnEprme9OQgDzbbkN4 XH1N01EvF+a8rAzApQ4gKM6UnBHczi3+ttG8EWwALQzuMRd3gl8MfnMo1UaxI0KBLywrzC RijiJdF6SXWj72QRkcxWFM5e+OPZytNmd/caKXqQsm/vXzyFjkaL6mv/Eecv8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681480852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pVVsojSJg8tBd4teUxHf2Wz9tYggH63alEBWGmGSOP4=; b=Vd0DxZuArmFVq3hGxFrRLw3fihKWgqwn9VJfFcFscGJeyhwHZnNQZRxFnCapE9XXICS6UZ oxbOAdyhAN0P7unq0lDjnEXL3EpS82rQFab97VGWqDS0fPP6RLjEG+EjjfX0wGvfB9aYDt gi0HMpcu4EHGBJYYQJu2KukF3ugKK5amaOtXq7synULPbDtkdwt43pObGysMLY8a4gJGEJ 4T7Kaj5W0rX/Ux0WjMRsUc7iOoTIIsBwQLA/hK5JKab+t8v1PUmmYIL4tmEDlH+rygylyz mW8GGDebYb5lqEWDdQ9dI0f/lFbjh8oQhl3m9qa3UbiyBSKg5WCA538fkw/yCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681480852; a=rsa-sha256; cv=none; b=DtPjS6e3aSMgFJ8mKNf3BJP5qcmCFAdMQNKFG919yC0dOka6dSKdzxhFLmydJ9dOIoTKrx tmNr+RBpIU5aMxVEsaOHTgBnnjxlIgvm1MlupcMrf1EhHYKS7GTigvtsmGas05Y0Us25hu VnfrY/DA26FJwZaprWPgHentU+zK8gQ3sE4bNoRbjo2cNMOiZw+6kOqEba5d60fL8lLZKh ZXYijGmFYyckUVS3RfXHTlpagzGwv8vDLBLABIoy/915sHF/4gC/n6RIepgxF6qGoOCFym 383O8ChJsAXKPCtSZAwBUuvh3oFbRpFO3hN36ULLfDm5IrthN5nMWbEIIwI1KA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PydQD0S7KzQcN; Fri, 14 Apr 2023 14:00:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33EE0p0h083674; Fri, 14 Apr 2023 14:00:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33EE0pVt083673; Fri, 14 Apr 2023 14:00:51 GMT (envelope-from git) Date: Fri, 14 Apr 2023 14:00:51 GMT Message-Id: <202304141400.33EE0pVt083673@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Roger=20Pau=20Monn=C3=A9?= Subject: git: ecdcad6516c9 - main - xen: remove CONFIG_XEN_COMPAT, purge Xen 3.0 compatibility List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ecdcad6516c9a911a701e362f23a9d2643a6d7d0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=ecdcad6516c9a911a701e362f23a9d2643a6d7d0 commit ecdcad6516c9a911a701e362f23a9d2643a6d7d0 Author: Elliott Mitchell AuthorDate: 2022-03-27 22:10:24 +0000 Commit: Roger Pau Monné CommitDate: 2023-04-14 13:58:48 +0000 xen: remove CONFIG_XEN_COMPAT, purge Xen 3.0 compatibility This overlaps the purpose of __XEN_INTERFACE_VERSION__. Remove Xen 3.0.2 compatibility. __XEN_INTERFACE_VERSION__ has compatibility to Xen 3.2.8 enabled. As Xen 3.3 was released almost 15 years ago, it seems unlikely anyone hasn't updated. Reviewed by: royger --- sys/amd64/include/xen/hypercall.h | 58 ++------------------------------------- sys/i386/include/xen/hypercall.h | 54 +++--------------------------------- sys/xen/hypervisor.h | 10 +------ 3 files changed, 8 insertions(+), 114 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) \ @@ -212,13 +210,6 @@ HYPERVISOR_fpu_taskswitch( return _hypercall1(int, fpu_taskswitch, set); } -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( diff --git a/sys/i386/include/xen/hypercall.h b/sys/i386/include/xen/hypercall.h index f1757e8becaf..ff96cb93157c 100644 --- a/sys/i386/include/xen/hypercall.h +++ b/sys/i386/include/xen/hypercall.h @@ -38,8 +38,6 @@ extern char *hypercall_page; #define __STR(x) #x #define STR(x) __STR(x) -#define ENOXENSYS 38 -#define CONFIG_XEN_COMPAT 0x030002 #define HYPERCALL_STR(name) \ "call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)" @@ -190,13 +188,6 @@ HYPERVISOR_fpu_taskswitch( return _hypercall1(int, fpu_taskswitch, set); } -static inline int -HYPERVISOR_sched_op_compat( - int cmd, unsigned long arg) -{ - return _hypercall2(int, sched_op_compat, cmd, arg); -} - static inline int HYPERVISOR_sched_op( int cmd, void *arg) @@ -273,18 +264,7 @@ static inline int 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 @@ -305,17 +285,7 @@ static inline int 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 @@ -359,24 +329,10 @@ HYPERVISOR_suspend( struct sched_shutdown sched_shutdown = { .reason = SHUTDOWN_suspend }; - int rc = _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); + return _hypercall3(int, sched_op, SCHEDOP_shutdown, + &sched_shutdown, srec); } -#endif static inline int HYPERVISOR_callback_op( @@ -385,14 +341,12 @@ HYPERVISOR_callback_op( return _hypercall2(int, callback_op, cmd, arg); } -#ifndef CONFIG_XEN static inline unsigned long HYPERVISOR_hvm_op( int op, void *arg) { return _hypercall2(unsigned long, hvm_op, op, arg); } -#endif static inline int HYPERVISOR_xenoprof_op( diff --git a/sys/xen/hypervisor.h b/sys/xen/hypervisor.h index 4e79423c3a8e..96e42ce9a14b 100644 --- a/sys/xen/hypervisor.h +++ b/sys/xen/hypervisor.h @@ -32,13 +32,8 @@ HYPERVISOR_console_write(const char *str, int count) static inline int HYPERVISOR_yield(void) { - int rc = HYPERVISOR_sched_op(SCHEDOP_yield, NULL); -#if CONFIG_XEN_COMPAT <= 0x030002 - if (rc == -ENOXENSYS) - rc = HYPERVISOR_sched_op_compat(SCHEDOP_yield, 0); -#endif - return (rc); + return (HYPERVISOR_sched_op(SCHEDOP_yield, NULL)); } static inline void @@ -49,9 +44,6 @@ HYPERVISOR_shutdown(unsigned int reason) }; HYPERVISOR_sched_op(SCHEDOP_shutdown, &sched_shutdown); -#if CONFIG_XEN_COMPAT <= 0x030002 - HYPERVISOR_sched_op_compat(SCHEDOP_shutdown, reason); -#endif } #endif /* __XEN_HYPERVISOR_H__ */