From nobody Sun Sep 14 08:22:23 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1757489985; cv=pass; d=zohomail.com; s=zohoarc; b=afo39JJ1FxzvG/GrGbEBlIIQq128I13SUkCY1bdP8A312lnwu3Nog0PLUNSGiD1pnEm7o+DudsKo2jQ6u1IJ9oooLN2tzWJ/2XK+JsEmdZOMAfWwUfqJaNySTbtsJd8jxhRBnrDeGpZuc6icwzyGGJRIIH0f+md2hcsfCerobTc= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1757489985; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=mmjjRmwBMN19DHx48HzdXSUmgXoB7lWnLJIzlZkESg8=; b=k1tlmvFPcC+v0P6mUmd/VYbOGxuFvYvm207LGR48EaueZ/PuniBzYPJgL3Jq5w7LUfBhDlcithoSDur1g55GcQEyQdyot6SeppC84Vsch+ttPLyoTtgH9FMFwKuNqca8eIai1IjFIJ2GdrmeFydbfEaemeTMtChZilZlVHa+etg= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1757489985448562.3890275958686; Wed, 10 Sep 2025 00:39:45 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1117579.1463666 (Exim 4.92) (envelope-from ) id 1uwFQN-0006ej-So; Wed, 10 Sep 2025 07:39:27 +0000 Received: by outflank-mailman (output) from mailman id 1117579.1463666; Wed, 10 Sep 2025 07:39:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uwFQN-0006ec-Nn; Wed, 10 Sep 2025 07:39:27 +0000 Received: by outflank-mailman (input) for mailman id 1117579; Wed, 10 Sep 2025 07:39:25 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uwFQL-0005yo-Gz for xen-devel@lists.xenproject.org; Wed, 10 Sep 2025 07:39:25 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on20617.outbound.protection.outlook.com [2a01:111:f403:2418::617]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 4471cef5-8e19-11f0-9809-7dc792cee155; Wed, 10 Sep 2025 09:39:23 +0200 (CEST) Received: from BYAPR11CA0044.namprd11.prod.outlook.com (2603:10b6:a03:80::21) by PH7PR12MB5853.namprd12.prod.outlook.com (2603:10b6:510:1d4::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9094.22; Wed, 10 Sep 2025 07:39:16 +0000 Received: from SN1PEPF000252A1.namprd05.prod.outlook.com (2603:10b6:a03:80:cafe::1b) by BYAPR11CA0044.outlook.office365.com (2603:10b6:a03:80::21) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9115.15 via Frontend Transport; Wed, 10 Sep 2025 07:39:16 +0000 Received: from satlexmb07.amd.com (165.204.84.17) by SN1PEPF000252A1.mail.protection.outlook.com (10.167.242.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9115.13 via Frontend Transport; Wed, 10 Sep 2025 07:39:15 +0000 Received: from penny-System-Product-Name.amd.com (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17; Wed, 10 Sep 2025 00:39:00 -0700 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 4471cef5-8e19-11f0-9809-7dc792cee155 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TDn/iPtAeFk2eolpwvEXxyGtiRb0z1Up5i+4L5Iv461Mx1yVqktEfmsOcLs3/dcG7EUp3vDL9HDm71a3hT+FSAR2JheFQKUoMb4j2VXxNSkr+Gd8M8+mIL+GZbe+niug3yfLC/xs45dGZ9loL3d78CZNhVdejG77eNmRNH6eJweOIGTUncFu2s2PO6kQMclnmw9dGn0apW9IOSa/aq387YrDmR7lAVTUeit9IhuV4FtwCPFIgwzhjf+LGeaR8lCuikRNWZZX0mDknD5q3Ka5eEW4Soe+cEoTOKoq6n8oUE/uJWQKEj7kVfY5w+LCTin98slKA4eoPpCd8X2nGvJNoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mmjjRmwBMN19DHx48HzdXSUmgXoB7lWnLJIzlZkESg8=; b=owPkcO50ToyKBWkA+ee4VT74Hz03nbvo3Zdeksogb3b7OLq89y3fyabihHo1Quf4Zbgw1MAhFEmMAFiz+N/7Jfrb2PurOF9JQ+4YykEAHH0nXzhjH4bLZpBNYnUom92vAnCWVico9Zbbijia7XvhvPLsNrZox2mkDnux33nldVwugvFc22qcf9W0t0tFFCjdt82ycrUZy6sSO9Pi5vKxOdqYQZ7kMTaF2eAH4U9+lR8bL+SWIPep2LQDp3MCARjLEdAf9/pCzM5rit+iizLMFpTEOjVcejjg6fYNPKOfGu65mHjCkmwr7zz/Wc7ZQ1d9aj5oNO/5BIYphcoVL7zGyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mmjjRmwBMN19DHx48HzdXSUmgXoB7lWnLJIzlZkESg8=; b=SasBvWLOY5+BxXYlgiMYoP5TsMw3F89UZgdfFIEvVJuirpYSDcF5H1aWIamjjiFX3Y6O+EHeCltLiGhPYGj25fY2TF/S44+E/hjzFrL1PLpWrOa9h1aIcd7sRKf+HX/y24+5RbPvN/Qe/vQognVj9XAS72dZjKBd2Rq1S1rNEeM= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C From: Penny Zheng To: , CC: , Penny Zheng , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , "Julien Grall" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini , "Bertrand Marquis" , Volodymyr Babchuk , Alistair Francis , Bob Eshleman , Connor Davis , Oleksii Kurochko , Nathan Studer , Stewart Hildebrand , "Dario Faggioli" , Juergen Gross , George Dunlap , "Daniel P. Smith" Subject: [PATCH v2 02/26] xen/sysctl: replace CONFIG_SYSCTL with CONFIG_MGMT_DOMCTL Date: Wed, 10 Sep 2025 15:38:03 +0800 Message-ID: <20250910073827.3622177-3-Penny.Zheng@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250910073827.3622177-1-Penny.Zheng@amd.com> References: <20250910073827.3622177-1-Penny.Zheng@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: satlexmb07.amd.com (10.181.42.216) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF000252A1:EE_|PH7PR12MB5853:EE_ X-MS-Office365-Filtering-Correlation-Id: 6c366754-861e-47f8-4b00-08ddf03d2493 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|82310400026|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?SDCwXseAW7duwi/8yuHhOmmJmXQY/CMRvCfTRXmjsJEJbPaHkq6wN+/50URe?= =?us-ascii?Q?RXbuNSmsZv2EkHrky+zxgsnALCFtaR8hvkIBO67W+fHcOxIp1lY9HjJ6QfTk?= =?us-ascii?Q?t4MReTCWl0jPbMnrrRaIYsWu6J2YyMchlBtGVOvHBdQJVCzZ04r4oFTImAuZ?= =?us-ascii?Q?OBhiOBoyyaCxbJ1X3Bup2WRTMrSO+PXGvR9xQauAnFG2GwiUxVs5ebhcTk15?= =?us-ascii?Q?q+DEL0Z0KFTRlQ28uIkrIJX0MZmVY4hW4e6pAHHn3P2flm2uRjFweEG3V+gb?= =?us-ascii?Q?ZxdyGtodZ8QH97lOL/gGeBc33+qZamSVpr5csxFrBBlwMiVlQtY8QLNT+G0f?= =?us-ascii?Q?fowg2B9vfMhDp81/dpYp9Yv1Yeaxh/TpYYvamenGsS71McLLPNb/ttFZClE0?= =?us-ascii?Q?I+LUgatxYBclP2Kv2v+DFWUCMtGfB5RboYa7X+LODoTtfFugVpiaWZR8UIKZ?= =?us-ascii?Q?jM6ksgXZP5eekd4hrifEjba5n/JHgW8np/MdMu6LjRVRY2FmUpTM+erCVnCv?= =?us-ascii?Q?Q7JfTsT8x48AQUGOVo+fz/bEOnqRMIqdkmyPQSwxxMTehyCn/n69zw2VYe5U?= =?us-ascii?Q?55jU4PJjTj6QdzOOv8pWXTQoQdP3oml0b7f2G5qj166TesSAHDgXsdeLS2Nw?= =?us-ascii?Q?S1CqYH4n8jamPHPH2ghtS57WdQienXODk7Aa9gwycObqX/UOuptL5cKaxbna?= =?us-ascii?Q?t8m+wGsJzRxbYVAQoEBQ79ujyYBcmkMk5UQQbU3rSyAEDIPiB16hQeV3iHvi?= =?us-ascii?Q?7iAR8ImMctE9j58DrVAIyKZRTGbepRYuBI1Q39vrUII3TYv94+bpV2kpXqyZ?= =?us-ascii?Q?Xq1WOsdgHaOT77/MunC8nCh69wxsfseloE8K9Lhex4fYYC77vzoRub7gye02?= =?us-ascii?Q?lhzLOEGS+5XJyYSqiqyjTg+7OJx1sniD6PWQYAPBzeb+qmwliV37x3gJVRUV?= =?us-ascii?Q?cAbj0O9QouXCyylZF0VdgGG3jkCLNq+eHZukt+JX0AqixvgU7o/G+4aD/xgo?= =?us-ascii?Q?lU5yXA8r4yUQTIlrzj8sInxgSn3WBjXzPnyXDR2Ei/4If2y04LFpxZba0Hro?= =?us-ascii?Q?+WepfyLX3XpICnGj7MogfC01DZhD5f5OgIM6uzTvNAbAtdz5P2NSg3qWCDuJ?= =?us-ascii?Q?tILGGIRYtiXder4Rrt8k6QXkVs0aoMl+/2JYlymeG+pZelR4R8+0BexYeOfc?= =?us-ascii?Q?OGIH2JDwGLDS38nHwFz6iG7FyZrRLQCRS8V/WE2pJI6DUB4zKroz2VsHb4FF?= =?us-ascii?Q?s7ly0VfioUP/4/oeT4ScIqSOAFgjPPX3TeuaJXoP+ODMOPIwyN8SKhVNia1R?= =?us-ascii?Q?uPjCP0xk/PCNi7k7VYbUy1KR4ti60lDEliHe/MPL94leRN5PsQ1rWc/0o1Z3?= =?us-ascii?Q?6XC8zaD1nEq6Qmrd6VnJYEFnw/5Wbe0S7CGkNY8Xy8PNL6Y5Ie0tfUVyHZmc?= =?us-ascii?Q?N8ZRZj8eahSeG/lHJibOIvaIn7gS5BnCrxIamf+wcgQsg3XBQiqhNke3Pi07?= =?us-ascii?Q?e31ZQsM0jCSoudM1506izVZCZ3KRmHJp4vaj?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(7416014)(82310400026)(1800799024)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2025 07:39:15.3094 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6c366754-861e-47f8-4b00-08ddf03d2493 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF000252A1.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5853 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1757489987448124100 Content-Type: text/plain; charset="utf-8" Rename all the CONFIG_SYSCTL into a single CONFIG_MGMT_HYPERCALLS to help provide a single option to manage all unnecessary hypercalls, including sysctl, domctl, etc, in dom0less system and PV shim mode, which could also make it easier to support randconfigs. Suggested-by: Stefano Stabellini Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini --- v1 -> v2: - new commit --- xen/Kconfig.debug | 2 +- xen/arch/arm/Makefile | 2 +- xen/arch/riscv/stubs.c | 4 ++-- xen/arch/x86/Makefile | 2 +- xen/arch/x86/configs/pvshim_defconfig | 2 +- xen/arch/x86/psr.c | 26 +++++++++++++------------- xen/common/Kconfig | 20 ++++++++------------ xen/common/Makefile | 2 +- xen/common/page_alloc.c | 8 ++++---- xen/common/perfc.c | 4 ++-- xen/common/sched/arinc653.c | 10 +++++----- xen/common/sched/core.c | 6 +++--- xen/common/sched/cpupool.c | 16 ++++++++-------- xen/common/sched/credit.c | 6 +++--- xen/common/sched/credit2.c | 6 +++--- xen/common/sched/private.h | 4 ++-- xen/common/spinlock.c | 4 ++-- xen/drivers/char/console.c | 4 ++-- xen/include/hypercall-defs.c | 4 ++-- xen/include/xsm/xsm.h | 12 ++++++------ xen/xsm/dummy.c | 6 +++--- xen/xsm/flask/hooks.c | 22 +++++++++++----------- 22 files changed, 84 insertions(+), 88 deletions(-) diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug index d900d926c5..a69615cd63 100644 --- a/xen/Kconfig.debug +++ b/xen/Kconfig.debug @@ -37,7 +37,7 @@ config SELF_TESTS =20 config COVERAGE bool "Code coverage support" - depends on SYSCTL && !LIVEPATCH + depends on MGMT_HYPERCALLS && !LIVEPATCH select SUPPRESS_DUPLICATE_SYMBOL_WARNINGS if !ENFORCE_UNIQUE_SYMBOLS help Enable code coverage support. diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 7e88ddd3d7..2aff1a1630 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -51,7 +51,7 @@ obj-y +=3D setup.o obj-y +=3D shutdown.o obj-y +=3D smp.o obj-y +=3D smpboot.o -obj-$(CONFIG_SYSCTL) +=3D sysctl.o +obj-$(CONFIG_MGMT_HYPERCALLS) +=3D sysctl.o obj-y +=3D time.o obj-y +=3D traps.o obj-y +=3D vcpreg.o diff --git a/xen/arch/riscv/stubs.c b/xen/arch/riscv/stubs.c index 1a8c86cd8d..a74e56843c 100644 --- a/xen/arch/riscv/stubs.c +++ b/xen/arch/riscv/stubs.c @@ -282,7 +282,7 @@ unsigned long raw_copy_from_guest(void *to, const void = __user *from, BUG_ON("unimplemented"); } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS /* sysctl.c */ =20 long arch_do_sysctl(struct xen_sysctl *sysctl, @@ -295,7 +295,7 @@ void arch_do_physinfo(struct xen_sysctl_physinfo *pi) { BUG_ON("unimplemented"); } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 /* p2m.c */ =20 diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 84a83839d6..a9fdba0b4c 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -67,7 +67,7 @@ obj-y +=3D smpboot.o obj-y +=3D spec_ctrl.o obj-y +=3D srat.o obj-y +=3D string.o -obj-$(CONFIG_SYSCTL) +=3D sysctl.o +obj-$(CONFIG_MGMT_HYPERCALLS) +=3D sysctl.o obj-y +=3D time.o obj-y +=3D traps-setup.o obj-y +=3D traps.o diff --git a/xen/arch/x86/configs/pvshim_defconfig b/xen/arch/x86/configs/p= vshim_defconfig index 24f4e4857d..d1db94df78 100644 --- a/xen/arch/x86/configs/pvshim_defconfig +++ b/xen/arch/x86/configs/pvshim_defconfig @@ -25,4 +25,4 @@ CONFIG_PDX_NONE=3Dy # CONFIG_INTEL_IOMMU is not set # CONFIG_DEBUG is not set # CONFIG_GDBSX is not set -# CONFIG_SYSCTL is not set +# CONFIG_MGMT_HYPERCALLS is not set diff --git a/xen/arch/x86/psr.c b/xen/arch/x86/psr.c index cce7020868..80ce5804b4 100644 --- a/xen/arch/x86/psr.c +++ b/xen/arch/x86/psr.c @@ -135,7 +135,7 @@ static const struct feat_props { */ enum psr_type alt_type; =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS /* get_feat_info is used to return feature HW info through sysctl. */ bool (*get_feat_info)(const struct feat_node *feat, uint32_t data[], unsigned int array_len); @@ -422,7 +422,7 @@ static bool mba_init_feature(const struct cpuid_leaf *r= egs, return true; } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS static bool cf_check cat_get_feat_info( const struct feat_node *feat, uint32_t data[], unsigned int array_len) { @@ -435,7 +435,7 @@ static bool cf_check cat_get_feat_info( =20 return true; } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 /* L3 CAT props */ static void cf_check l3_cat_write_msr( @@ -448,14 +448,14 @@ static const struct feat_props l3_cat_props =3D { .cos_num =3D 1, .type[0] =3D PSR_TYPE_L3_CBM, .alt_type =3D PSR_TYPE_UNKNOWN, -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS .get_feat_info =3D cat_get_feat_info, #endif .write_msr =3D l3_cat_write_msr, .sanitize =3D cat_check_cbm, }; =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS /* L3 CDP props */ static bool cf_check l3_cdp_get_feat_info( const struct feat_node *feat, uint32_t data[], uint32_t array_len) @@ -467,7 +467,7 @@ static bool cf_check l3_cdp_get_feat_info( =20 return true; } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 static void cf_check l3_cdp_write_msr( unsigned int cos, uint32_t val, enum psr_type type) @@ -483,7 +483,7 @@ static const struct feat_props l3_cdp_props =3D { .type[0] =3D PSR_TYPE_L3_DATA, .type[1] =3D PSR_TYPE_L3_CODE, .alt_type =3D PSR_TYPE_L3_CBM, -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS .get_feat_info =3D l3_cdp_get_feat_info, #endif .write_msr =3D l3_cdp_write_msr, @@ -501,14 +501,14 @@ static const struct feat_props l2_cat_props =3D { .cos_num =3D 1, .type[0] =3D PSR_TYPE_L2_CBM, .alt_type =3D PSR_TYPE_UNKNOWN, -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS .get_feat_info =3D cat_get_feat_info, #endif .write_msr =3D l2_cat_write_msr, .sanitize =3D cat_check_cbm, }; =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS /* MBA props */ static bool cf_check mba_get_feat_info( const struct feat_node *feat, uint32_t data[], unsigned int array_len) @@ -523,7 +523,7 @@ static bool cf_check mba_get_feat_info( =20 return true; } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 static void cf_check mba_write_msr( unsigned int cos, uint32_t val, enum psr_type type) @@ -561,7 +561,7 @@ static const struct feat_props mba_props =3D { .cos_num =3D 1, .type[0] =3D PSR_TYPE_MBA_THRTL, .alt_type =3D PSR_TYPE_UNKNOWN, -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS .get_feat_info =3D mba_get_feat_info, #endif .write_msr =3D mba_write_msr, @@ -826,7 +826,7 @@ static struct psr_socket_info *get_socket_info(unsigned= int socket) return socket_info + socket; } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS int psr_get_info(unsigned int socket, enum psr_type type, uint32_t data[], unsigned int array_len) { @@ -858,7 +858,7 @@ int psr_get_info(unsigned int socket, enum psr_type typ= e, =20 return -EINVAL; } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 int psr_get_val(struct domain *d, unsigned int socket, uint32_t *val, enum psr_type type) diff --git a/xen/common/Kconfig b/xen/common/Kconfig index 76f9ce705f..c1571377d3 100644 --- a/xen/common/Kconfig +++ b/xen/common/Kconfig @@ -508,7 +508,7 @@ config CRYPTO config LIVEPATCH bool "Live patching support" default X86 - depends on "$(XEN_HAS_BUILD_ID)" =3D "y" && SYSCTL && HAS_VMAP + depends on "$(XEN_HAS_BUILD_ID)" =3D "y" && MGMT_HYPERCALLS && HAS_VMAP select CC_SPLIT_SECTIONS help Allows a running Xen hypervisor to be dynamically patched using @@ -600,7 +600,7 @@ config DTB_FILE config TRACEBUFFER bool "Enable tracing infrastructure" if EXPERT default y - depends on SYSCTL + depends on MGMT_HYPERCALLS help Enable tracing infrastructure and pre-defined tracepoints within Xen. This will allow live information about Xen's execution and performance @@ -648,21 +648,17 @@ config SYSTEM_SUSPEND =20 If unsure, say N. =20 -menu "Supported hypercall interfaces" - visible if EXPERT - -config SYSCTL - bool "Enable sysctl hypercall" +config MGMT_HYPERCALLS + bool "Enable hypercalls under management" default y help This option shall only be disabled on some dom0less systems, or - PV shim on x86, to reduce Xen footprint. - -endmenu + PV shim on x86, to reduce Xen footprint via managing unnessary + hypercalls, like sysctl, etc. =20 config PM_OP bool "Enable Performance Management Operation" - depends on ACPI && HAS_CPUFREQ && SYSCTL + depends on ACPI && HAS_CPUFREQ && MGMT_HYPERCALLS default y help This option shall enable userspace performance management control @@ -670,7 +666,7 @@ config PM_OP =20 config PM_STATS bool "Enable Performance Management Statistics" - depends on ACPI && HAS_CPUFREQ && SYSCTL + depends on ACPI && HAS_CPUFREQ && MGMT_HYPERCALLS default y help Enable collection of performance management statistics to aid in diff --git a/xen/common/Makefile b/xen/common/Makefile index be442a3e47..fdf826f218 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -52,7 +52,7 @@ obj-y +=3D spinlock.o obj-$(CONFIG_STACK_PROTECTOR) +=3D stack-protector.o obj-y +=3D stop_machine.o obj-y +=3D symbols.o -obj-$(CONFIG_SYSCTL) +=3D sysctl.o +obj-$(CONFIG_MGMT_HYPERCALLS) +=3D sysctl.o obj-y +=3D tasklet.o obj-y +=3D time.o obj-y +=3D timer.o diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 1f67b88a89..26615d1e97 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -602,7 +602,7 @@ out: return ret; } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS void get_outstanding_claims(uint64_t *free_pages, uint64_t *outstanding_pa= ges) { spin_lock(&heap_lock); @@ -610,7 +610,7 @@ void get_outstanding_claims(uint64_t *free_pages, uint6= 4_t *outstanding_pages) *free_pages =3D avail_heap_pages(MEMZONE_XEN + 1, NR_ZONES - 1, -1); spin_unlock(&heap_lock); } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 static bool __read_mostly first_node_initialised; #ifndef CONFIG_SEPARATE_XENHEAP @@ -1788,7 +1788,7 @@ int offline_page(mfn_t mfn, int broken, uint32_t *sta= tus) return 0; } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS /* * Online the memory. * The caller should make sure end_pfn <=3D max_page, @@ -1873,7 +1873,7 @@ int query_page_offline(mfn_t mfn, uint32_t *status) =20 return 0; } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 /* * This function should only be called with valid pages from the same NUMA diff --git a/xen/common/perfc.c b/xen/common/perfc.c index 0f3b89af2c..97a94ef1fc 100644 --- a/xen/common/perfc.c +++ b/xen/common/perfc.c @@ -149,7 +149,7 @@ void cf_check perfc_reset(unsigned char key) } } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS static struct xen_sysctl_perfc_desc perfc_d[NR_PERFCTRS]; static xen_sysctl_perfc_val_t *perfc_vals; static unsigned int perfc_nbr_vals; @@ -266,7 +266,7 @@ int perfc_control(struct xen_sysctl_perfc_op *pc) =20 return rc; } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 /* * Local variables: diff --git a/xen/common/sched/arinc653.c b/xen/common/sched/arinc653.c index 8a4f4259d8..7d6c40d800 100644 --- a/xen/common/sched/arinc653.c +++ b/xen/common/sched/arinc653.c @@ -220,7 +220,7 @@ static void update_schedule_units(const struct schedule= r *ops) SCHED_PRIV(ops)->schedule[i].unit_id); } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS /** * This function is called by the adjust_global scheduler hook to put * in place a new ARINC653 schedule. @@ -335,7 +335,7 @@ arinc653_sched_get( =20 return 0; } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 /************************************************************************** * Scheduler callback functions * @@ -661,7 +661,7 @@ a653_switch_sched(struct scheduler *new_ops, unsigned i= nt cpu, return &sr->_lock; } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS /** * Xen scheduler callback function to perform a global (not domain-specifi= c) * adjustment. It is used by the ARINC 653 scheduler to put in place a new @@ -701,7 +701,7 @@ a653sched_adjust_global(const struct scheduler *ops, =20 return rc; } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 /** * This structure defines our scheduler for Xen. @@ -736,7 +736,7 @@ static const struct scheduler sched_arinc653_def =3D { .switch_sched =3D a653_switch_sched, =20 .adjust =3D NULL, -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS .adjust_global =3D a653sched_adjust_global, #endif =20 diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c index 2ab4313517..a0faddcb92 100644 --- a/xen/common/sched/core.c +++ b/xen/common/sched/core.c @@ -2068,7 +2068,7 @@ long do_set_timer_op(s_time_t timeout) return 0; } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS /* scheduler_id - fetch ID of current scheduler */ int scheduler_id(void) { @@ -2111,7 +2111,7 @@ long sched_adjust(struct domain *d, struct xen_domctl= _scheduler_op *op) return ret; } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS long sched_adjust_global(struct xen_sysctl_scheduler_op *op) { struct cpupool *pool; @@ -2140,7 +2140,7 @@ long sched_adjust_global(struct xen_sysctl_scheduler_= op *op) =20 return rc; } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 static void vcpu_periodic_timer_work_locked(struct vcpu *v) { diff --git a/xen/common/sched/cpupool.c b/xen/common/sched/cpupool.c index f5459c2779..51ba3cb43d 100644 --- a/xen/common/sched/cpupool.c +++ b/xen/common/sched/cpupool.c @@ -241,12 +241,12 @@ struct cpupool *cpupool_get_by_id(unsigned int poolid) return __cpupool_get_by_id(poolid, true); } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS static struct cpupool *cpupool_get_next_by_id(unsigned int poolid) { return __cpupool_get_by_id(poolid, false); } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 void cpupool_put(struct cpupool *pool) { @@ -354,7 +354,7 @@ static struct cpupool *cpupool_create(unsigned int pool= id, =20 return ERR_PTR(ret); } -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS /* * destroys the given cpupool * returns 0 on success, 1 else @@ -382,7 +382,7 @@ static int cpupool_destroy(struct cpupool *c) debugtrace_printk("cpupool_destroy(pool=3D%u)\n", c->cpupool_id); return 0; } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 /* * Move domain to another cpupool @@ -572,7 +572,7 @@ static int cpupool_unassign_cpu_start(struct cpupool *c= , unsigned int cpu) return ret; } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS static long cf_check cpupool_unassign_cpu_helper(void *info) { struct cpupool *c =3D info; @@ -638,7 +638,7 @@ static int cpupool_unassign_cpu(struct cpupool *c, unsi= gned int cpu) } return continue_hypercall_on_cpu(work_cpu, cpupool_unassign_cpu_helper= , c); } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 /* * add a new domain to a cpupool @@ -816,7 +816,7 @@ static void cpupool_cpu_remove_forced(unsigned int cpu) rcu_read_unlock(&sched_res_rculock); } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS /* * do cpupool related sysctl operations */ @@ -982,7 +982,7 @@ int cpupool_do_sysctl(struct xen_sysctl_cpupool_op *op) =20 return ret; } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 unsigned int cpupool_get_id(const struct domain *d) { diff --git a/xen/common/sched/credit.c b/xen/common/sched/credit.c index 6dcf6b2c8b..0cbec2a9c0 100644 --- a/xen/common/sched/credit.c +++ b/xen/common/sched/credit.c @@ -1256,7 +1256,7 @@ __csched_set_tslice(struct csched_private *prv, unsig= ned int timeslice_ms) prv->credit =3D prv->credits_per_tslice * prv->ncpus; } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS static int cf_check csched_sys_cntl(const struct scheduler *ops, struct xen_sysctl_scheduler_op *sc) @@ -1299,7 +1299,7 @@ csched_sys_cntl(const struct scheduler *ops, out: return rc; } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 static void *cf_check csched_alloc_domdata(const struct scheduler *ops, struct domain *dom) @@ -2290,7 +2290,7 @@ static const struct scheduler sched_credit_def =3D { =20 .adjust =3D csched_dom_cntl, .adjust_affinity=3D csched_aff_cntl, -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS .adjust_global =3D csched_sys_cntl, #endif =20 diff --git a/xen/common/sched/credit2.c b/xen/common/sched/credit2.c index 75316d42b7..307e63ebd8 100644 --- a/xen/common/sched/credit2.c +++ b/xen/common/sched/credit2.c @@ -3131,7 +3131,7 @@ csched2_aff_cntl(const struct scheduler *ops, struct = sched_unit *unit, __clear_bit(__CSFLAG_pinned, &svc->flags); } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS static int cf_check csched2_sys_cntl( const struct scheduler *ops, struct xen_sysctl_scheduler_op *sc) { @@ -3163,7 +3163,7 @@ static int cf_check csched2_sys_cntl( =20 return 0; } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 static void *cf_check csched2_alloc_domdata(const struct scheduler *ops, struct domain *dom) @@ -4248,7 +4248,7 @@ static const struct scheduler sched_credit2_def =3D { =20 .adjust =3D csched2_dom_cntl, .adjust_affinity=3D csched2_aff_cntl, -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS .adjust_global =3D csched2_sys_cntl, #endif =20 diff --git a/xen/common/sched/private.h b/xen/common/sched/private.h index d6884550cd..b7ff67200b 100644 --- a/xen/common/sched/private.h +++ b/xen/common/sched/private.h @@ -356,7 +356,7 @@ struct scheduler { struct sched_unit *unit, const struct cpumask *hard, const struct cpumask *soft); -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS int (*adjust_global) (const struct scheduler *ops, struct xen_sysctl_scheduler_op *sc); #endif @@ -512,7 +512,7 @@ static inline int sched_adjust_dom(const struct schedul= er *s, struct domain *d, return s->adjust ? s->adjust(s, d, op) : 0; } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS static inline int sched_adjust_cpupool(const struct scheduler *s, struct xen_sysctl_scheduler_op *op) { diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c index 0389293b09..9d08159615 100644 --- a/xen/common/spinlock.c +++ b/xen/common/spinlock.c @@ -690,7 +690,7 @@ void cf_check spinlock_profile_reset(unsigned char key) spinlock_profile_iterate(spinlock_profile_reset_elem, NULL); } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS typedef struct { struct xen_sysctl_lockprof_op *pc; int rc; @@ -750,7 +750,7 @@ int spinlock_profile_control(struct xen_sysctl_lockprof= _op *pc) =20 return rc; } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 void _lock_profile_register_struct( int32_t type, struct lock_profile_qhead *qhead, int32_t idx) diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index 9bd5b4825d..c38b58d5fc 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -371,7 +371,7 @@ static void conring_puts(const char *str, size_t len) conringc =3D conringp - conring_size; } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS long read_console_ring(struct xen_sysctl_readconsole *op) { XEN_GUEST_HANDLE_PARAM(char) str; @@ -414,7 +414,7 @@ long read_console_ring(struct xen_sysctl_readconsole *o= p) =20 return 0; } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 =20 /* diff --git a/xen/include/hypercall-defs.c b/xen/include/hypercall-defs.c index 221dc25f6f..cd2c801af6 100644 --- a/xen/include/hypercall-defs.c +++ b/xen/include/hypercall-defs.c @@ -194,7 +194,7 @@ kexec_op(unsigned long op, void *uarg) #ifdef CONFIG_IOREQ_SERVER dm_op(domid_t domid, unsigned int nr_bufs, xen_dm_op_buf_t *bufs) #endif -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS sysctl(xen_sysctl_t *u_sysctl) #endif #if defined(CONFIG_X86) && defined(CONFIG_PAGING) @@ -277,7 +277,7 @@ physdev_op compat do hv= m hvm do_arm #ifdef CONFIG_HVM hvm_op do do do do do #endif -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS sysctl do do do do do #endif domctl do do do do do diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h index 9a23d2827c..3c960ad909 100644 --- a/xen/include/xsm/xsm.h +++ b/xen/include/xsm/xsm.h @@ -57,7 +57,7 @@ struct xsm_ops { int (*domain_create)(struct domain *d, uint32_t ssidref); int (*getdomaininfo)(struct domain *d); int (*domctl_scheduler_op)(struct domain *d, int op); -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS int (*sysctl_scheduler_op)(int op); #endif int (*set_target)(struct domain *d, struct domain *e); @@ -140,7 +140,7 @@ struct xsm_ops { int (*resource_setup_gsi)(int gsi); int (*resource_setup_misc)(void); =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS int (*page_offline)(uint32_t cmd); #endif int (*hypfs_op)(void); @@ -246,7 +246,7 @@ static inline int xsm_domctl_scheduler_op( return alternative_call(xsm_ops.domctl_scheduler_op, d, cmd); } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS static inline int xsm_sysctl_scheduler_op(xsm_default_t def, int cmd) { return alternative_call(xsm_ops.sysctl_scheduler_op, cmd); @@ -267,7 +267,7 @@ static inline int xsm_domctl(xsm_default_t def, struct = domain *d, =20 static inline int xsm_sysctl(xsm_default_t def, int cmd) { -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS return alternative_call(xsm_ops.sysctl, cmd); #else return -EOPNOTSUPP; @@ -276,7 +276,7 @@ static inline int xsm_sysctl(xsm_default_t def, int cmd) =20 static inline int xsm_readconsole(xsm_default_t def, uint32_t clear) { -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS return alternative_call(xsm_ops.readconsole, clear); #else return -EOPNOTSUPP; @@ -603,7 +603,7 @@ static inline int xsm_resource_setup_misc(xsm_default_t= def) =20 static inline int xsm_page_offline(xsm_default_t def, uint32_t cmd) { -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS return alternative_call(xsm_ops.page_offline, cmd); #else return -EOPNOTSUPP; diff --git a/xen/xsm/dummy.c b/xen/xsm/dummy.c index 8b7e01b506..f5483e0709 100644 --- a/xen/xsm/dummy.c +++ b/xen/xsm/dummy.c @@ -19,12 +19,12 @@ static const struct xsm_ops __initconst_cf_clobber dumm= y_ops =3D { .domain_create =3D xsm_domain_create, .getdomaininfo =3D xsm_getdomaininfo, .domctl_scheduler_op =3D xsm_domctl_scheduler_op, -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS .sysctl_scheduler_op =3D xsm_sysctl_scheduler_op, #endif .set_target =3D xsm_set_target, .domctl =3D xsm_domctl, -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS .sysctl =3D xsm_sysctl, .readconsole =3D xsm_readconsole, #endif @@ -98,7 +98,7 @@ static const struct xsm_ops __initconst_cf_clobber dummy_= ops =3D { .resource_setup_gsi =3D xsm_resource_setup_gsi, .resource_setup_misc =3D xsm_resource_setup_misc, =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS .page_offline =3D xsm_page_offline, #endif .hypfs_op =3D xsm_hypfs_op, diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c index b0308e1b26..21914d3507 100644 --- a/xen/xsm/flask/hooks.c +++ b/xen/xsm/flask/hooks.c @@ -626,7 +626,7 @@ static int cf_check flask_domctl_scheduler_op(struct do= main *d, int op) } } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS static int cf_check flask_sysctl_scheduler_op(int op) { switch ( op ) @@ -641,7 +641,7 @@ static int cf_check flask_sysctl_scheduler_op(int op) return avc_unknown_permission("sysctl_scheduler_op", op); } } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 static int cf_check flask_set_target(struct domain *d, struct domain *t) { @@ -858,7 +858,7 @@ static int cf_check flask_domctl(struct domain *d, unsi= gned int cmd, } } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS static int cf_check flask_sysctl(int cmd) { switch ( cmd ) @@ -946,7 +946,7 @@ static int cf_check flask_readconsole(uint32_t clear) =20 return domain_has_xen(current->domain, perms); } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 static inline uint32_t resource_to_perm(uint8_t access) { @@ -1208,12 +1208,12 @@ static int cf_check flask_resource_unplug_core(void) return avc_current_has_perm(SECINITSID_DOMXEN, SECCLASS_RESOURCE, RESO= URCE__UNPLUG, NULL); } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS static int flask_resource_use_core(void) { return avc_current_has_perm(SECINITSID_DOMXEN, SECCLASS_RESOURCE, RESO= URCE__USE, NULL); } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 static int cf_check flask_resource_plug_pci(uint32_t machine_bdf) { @@ -1278,7 +1278,7 @@ static int cf_check flask_resource_setup_misc(void) return avc_current_has_perm(SECINITSID_XEN, SECCLASS_RESOURCE, RESOURC= E__SETUP, NULL); } =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS static inline int cf_check flask_page_offline(uint32_t cmd) { switch ( cmd ) @@ -1293,7 +1293,7 @@ static inline int cf_check flask_page_offline(uint32_= t cmd) return avc_unknown_permission("page_offline", cmd); } } -#endif /* CONFIG_SYSCTL */ +#endif /* CONFIG_MGMT_HYPERCALLS */ =20 static inline int cf_check flask_hypfs_op(void) { @@ -1889,12 +1889,12 @@ static const struct xsm_ops __initconst_cf_clobber = flask_ops =3D { .domain_create =3D flask_domain_create, .getdomaininfo =3D flask_getdomaininfo, .domctl_scheduler_op =3D flask_domctl_scheduler_op, -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS .sysctl_scheduler_op =3D flask_sysctl_scheduler_op, #endif .set_target =3D flask_set_target, .domctl =3D flask_domctl, -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS .sysctl =3D flask_sysctl, .readconsole =3D flask_readconsole, #endif @@ -1956,7 +1956,7 @@ static const struct xsm_ops __initconst_cf_clobber fl= ask_ops =3D { .resource_setup_gsi =3D flask_resource_setup_gsi, .resource_setup_misc =3D flask_resource_setup_misc, =20 -#ifdef CONFIG_SYSCTL +#ifdef CONFIG_MGMT_HYPERCALLS .page_offline =3D flask_page_offline, #endif .hypfs_op =3D flask_hypfs_op, --=20 2.34.1