From nobody Fri Oct 31 03:46:13 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=1752208383; cv=pass; d=zohomail.com; s=zohoarc; b=Ab08iqNq4ZJOD3oCkJNsVbeEQqMTb/3ejZpOWPul2Ct3fHaloeywQHYTtwZzC6hhXwGGInJF26OgPAU25kNaQHSQxqnrH9ASPfwkmv4KUvdaCLXTZ8PQann4nq610UqrLUAKz4rsA3isiQn7SpTZvjin6ecRvCIMjupi/d9R1Ac= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752208383; 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=WvykzEStZK73rMFsbUxdbGQm1JqJFz8VY0tKPFQ221s=; b=ioaUOREOUDHYxQK7j0fG1byAQi7FdqCENCowaQuQVEiM8IRelQjfA398WaOjIDOmkFh+KgEl/xmmpdA6JNtZek4b7HDrWsuYr9zGP1uPIVGZMt1crK4YYNUVxaYKnqgQ2oh1RM6LSpT88V0X/8d2tpdKvtdywjQjGEy3aAy7TYQ= 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 1752208383031368.27074399831474; Thu, 10 Jul 2025 21:33:03 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1040360.1411826 (Exim 4.92) (envelope-from ) id 1ua5RB-0004RP-79; Fri, 11 Jul 2025 04:32:41 +0000 Received: by outflank-mailman (output) from mailman id 1040360.1411826; Fri, 11 Jul 2025 04:32:41 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ua5RB-0004RB-44; Fri, 11 Jul 2025 04:32:41 +0000 Received: by outflank-mailman (input) for mailman id 1040360; Fri, 11 Jul 2025 04:32:40 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ua5R9-0003OX-UU for xen-devel@lists.xenproject.org; Fri, 11 Jul 2025 04:32:40 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on20605.outbound.protection.outlook.com [2a01:111:f403:2417::605]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 12c5d654-5e10-11f0-a318-13f23c93f187; Fri, 11 Jul 2025 06:32:38 +0200 (CEST) Received: from BN9PR03CA0521.namprd03.prod.outlook.com (2603:10b6:408:131::16) by MN0PR12MB5811.namprd12.prod.outlook.com (2603:10b6:208:377::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8922.25; Fri, 11 Jul 2025 04:32:32 +0000 Received: from BN3PEPF0000B06B.namprd21.prod.outlook.com (2603:10b6:408:131:cafe::e5) by BN9PR03CA0521.outlook.office365.com (2603:10b6:408:131::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8922.22 via Frontend Transport; Fri, 11 Jul 2025 04:32:31 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN3PEPF0000B06B.mail.protection.outlook.com (10.167.243.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8943.1 via Frontend Transport; Fri, 11 Jul 2025 04:32:31 +0000 Received: from penny-System-Product-Name.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 10 Jul 2025 23:32:28 -0500 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: 12c5d654-5e10-11f0-a318-13f23c93f187 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pRo05I/CEfaEToqvwjnGzJ968o/Rs9xu4jJdKxVLu889y9YufTpLd8TqKzDhxtnnxx3zu+7r6zsYlD/ZlniKSf6bJYD4UXi0I9sF4AdeAPsrqxt2tgzQRj8kR+cmoNlTYOcUeujA+UiuPr8FUx5aSMSwjRRg9NxG2zMLiU7vL31TRcthHHwpcl5wJH7UHmgllSEuuTZzKnUpEjdJwVdnIo6Sm/XAxr/35qTi0youkl+WSRvhXfUHFbejbVAjG7zEUPQyoDr89sMx4RR/B564gqRg7SdwO6YyHRF9pzxdd+MK4WkHCLzlUUVukM7ndgIdN4kTimYi55dCeWusyaJdtw== 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=WvykzEStZK73rMFsbUxdbGQm1JqJFz8VY0tKPFQ221s=; b=OhQmM475vJBxeqOCT/l0lpPV25QyXwQHYpNAlFfyat8A4vNgRc+OaVygypsd3pHP1PXgpebBIpjyXlD//Jr9pOxijE4R0B1WRxDO8HyfaVAqPjj5Ex4jX23WYsFVmuglVlnvSn1AwvciD0QKbfiZSIO7GlBUMlW7APrEXJjBb961u1O8PTjjqcuAAbFp9BsfDndoTFHL1M+1+3wUX0i782M2SvtCFgu/0zwfCtnoWOjqdU1B8JDUE2ScNHpbXM8Id25JlUWuxiK/10H0gySDf524VNGZeqPe9c/FwEI0ycjKuTIDtkINT4pJCHLHcF25QMfulXYQeORMlror0n/yFw== 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=WvykzEStZK73rMFsbUxdbGQm1JqJFz8VY0tKPFQ221s=; b=xEcRBZSgLR6PP/FRqTYLP7EcAZk/WuB/1/o4I4yyMIt32v+/j9mQoU8c7CwKRPfXg/oxamOD3zojGKs3Saj77fK9kSvjbw21kKqhsidMvqESuMryIpaRLIy99UmjxzzGv8PZ1xI2DGquc51VrGgFc3Zq4BwuFIStY91KXymcNE0= 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=SATLEXMB04.amd.com; pr=C From: Penny Zheng To: , CC: , Penny Zheng , Nathan Studer , Stewart Hildebrand , "Dario Faggioli" , Juergen Gross , George Dunlap , "Daniel P. Smith" , Stefano Stabellini Subject: [PATCH v8 4/7] xen/sysctl: wrap around XEN_SYSCTL_scheduler_op Date: Fri, 11 Jul 2025 12:31:55 +0800 Message-ID: <20250711043158.2566880-5-Penny.Zheng@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250711043158.2566880-1-Penny.Zheng@amd.com> References: <20250711043158.2566880-1-Penny.Zheng@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PEPF0000B06B:EE_|MN0PR12MB5811:EE_ X-MS-Office365-Filtering-Correlation-Id: ace85ff3-f72e-4ae1-5d70-08ddc033f38a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?u9w+UdG9Im0g4IO3YxLbMurZIIxZAr+/shZLDQYy1QlOP4q4cnjfhmLqAPW0?= =?us-ascii?Q?1lcYKEUA9Th1k4H7jJrFUrwsfp/WVozIy7sZ+zzbJNAebCGXu0s6bgnqOfi1?= =?us-ascii?Q?mqR42MCJwpkIr6VCGHqqE1To2VYOyqigCLXvgBTvb6M+TphTzenVRQgtE2wD?= =?us-ascii?Q?cPcRSpw+RLAhy8UZmlZI43t8Uhj8rVwQzmFzE/AzKfEE10sJUFxnzVWs++qm?= =?us-ascii?Q?UjF1UOyV5LTVTsmRzTipAWUiQUQu3bWAb+JabncGEgDskgBmFfRDJ2qZSHkp?= =?us-ascii?Q?r4KB+CmUAeotfgd2OIiQlYR8WQFjVoIRxXznE2fkugD8mwLEryx6rkyPfmA+?= =?us-ascii?Q?98WokJssKjMlaw36T4vUwbYv/sd4JiAwmhHrVb5sbRYZK9niTR+jIvEpjzzI?= =?us-ascii?Q?9VynmbInIIygYBPtX6nXSnOO/TTCITKZCmQ8Oihn6yW7rT4R4uyjsuyGdNEk?= =?us-ascii?Q?y+z5uVYKXKun9e0GjmMPHlfyXwrlJa7L61vg+YuwEv0jMYRCvP3pZ/Ze/1KC?= =?us-ascii?Q?zavAWdbbMovVsj1CQgIm+4/dKoRWGDI23/G2iBcoJ07jKT8MHL5JREidRQ1i?= =?us-ascii?Q?APS57b3xU/bXl0SC4UGTo623BufhYwBn9/r6W4dXTtDp35IadeqYgahTB1GV?= =?us-ascii?Q?xAxTFbK7u/fY8vD6AzcM9kdye1LMJIxst7Gom84GovLgLKNYpNSA5AVbaGKk?= =?us-ascii?Q?JCe+L4R1G1Q7PVj7JDhUIl44orNGB5uXmZZVNvZzoW2qvPVj2EcpfKrPOnMs?= =?us-ascii?Q?fzlVtmtupiZGGCS38YLqeXpykteD5M8tW4WN85OJenZKkowbsLNKBoNZ3N5p?= =?us-ascii?Q?8QPUS7qH1m6WyGZ1lWATLZ8pI8Mubb9PDqqafMnZGZBOfH6VIrRH6u/W8Nzy?= =?us-ascii?Q?lrGe9FvDDOLAlu/uTUgPjp7VXKxb3eu9L9/YCUy85vsg5oDWETUvLHRzxPHv?= =?us-ascii?Q?HgRAbRhBFwywFC+UkkDOiuhMCxX7l1tdBXW2oLuPsX6k5TqDu64dzyzzKKYs?= =?us-ascii?Q?pgfKBCaga655TmXQy5hZgkkai03plKT/GDLtrfDmxioBKDps8RCsACpps2Q4?= =?us-ascii?Q?Dl8eKsqyHp2lba3m6XiDt/z5u9d+wGza5bBzmt+g77ELX1Hn+o7Ocwq3AmOo?= =?us-ascii?Q?QVTbn3AZai+EgoMFEPOAWMYcd5V0HjWr4cEDeun02/luZAZ1mE2w6b7/uczf?= =?us-ascii?Q?rhYZ29kbEhnwui/eqt9vUJAyVB8kOAmRIIRJxs7yLjrCQC2wpiETE1/lm6EZ?= =?us-ascii?Q?h39z2TSh8dRMZe667q4/t/OGBEVE/mzaeQ96yiYvHbBPIQhuG4hkMyWRZ4J/?= =?us-ascii?Q?NXPNImKGQjJRvlNNkYODO4QoLBBLk4ZtmMaPACmhOz9tYBMMv9gAgMuvg7QS?= =?us-ascii?Q?3ccIg/MsPpZnw/0FZT3EM1JKdgwLGpGczzug9Ph4vGarSR4ECUS/P10Ggh5J?= =?us-ascii?Q?DAG55H2RVtasEzPcLdjkcjG7O6ElONRLynlqe0+lXheqDXyhP9jxLQeOJGrA?= =?us-ascii?Q?YeiZltbGwq5oanflTr4P+LJB7CEF6EMMGkG+?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(82310400026)(1800799024)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2025 04:32:31.7846 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ace85ff3-f72e-4ae1-5d70-08ddc033f38a 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=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN3PEPF0000B06B.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5811 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1752208384573116600 Content-Type: text/plain; charset="utf-8" Function sched_adjust_global is designed for XEN_SYSCTL_scheduler_op, so itself and its calling flow, like .adjust_global, shall all be wrapped. Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini Acked-by: Stewart Hildebrand #a653 Acked-by: Daniel P. Smith --- v1 -> v2: - no need to wrap declarations - add transient #ifdef in sysctl.c for correct compilation --- v2 -> v3: - move #endif up ahead of the blank line --- v3 -> v4: - remove transient "#ifdef CONFIG_SYSCTL" --- xen/common/sched/arinc653.c | 6 ++++++ xen/common/sched/core.c | 2 ++ xen/common/sched/credit.c | 4 ++++ xen/common/sched/credit2.c | 4 ++++ xen/common/sched/private.h | 4 ++++ xen/include/xsm/xsm.h | 4 ++++ xen/xsm/dummy.c | 2 ++ xen/xsm/flask/hooks.c | 4 ++++ 8 files changed, 30 insertions(+) diff --git a/xen/common/sched/arinc653.c b/xen/common/sched/arinc653.c index 432ccfe662..3c014c9934 100644 --- a/xen/common/sched/arinc653.c +++ b/xen/common/sched/arinc653.c @@ -220,6 +220,7 @@ static void update_schedule_units(const struct schedule= r *ops) SCHED_PRIV(ops)->schedule[i].unit_id); } =20 +#ifdef CONFIG_SYSCTL /** * This function is called by the adjust_global scheduler hook to put * in place a new ARINC653 schedule. @@ -334,6 +335,7 @@ arinc653_sched_get( =20 return 0; } +#endif /* CONFIG_SYSCTL */ =20 /************************************************************************** * Scheduler callback functions * @@ -653,6 +655,7 @@ a653_switch_sched(struct scheduler *new_ops, unsigned i= nt cpu, return &sr->_lock; } =20 +#ifdef CONFIG_SYSCTL /** * 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 @@ -692,6 +695,7 @@ a653sched_adjust_global(const struct scheduler *ops, =20 return rc; } +#endif /* CONFIG_SYSCTL */ =20 /** * This structure defines our scheduler for Xen. @@ -726,7 +730,9 @@ static const struct scheduler sched_arinc653_def =3D { .switch_sched =3D a653_switch_sched, =20 .adjust =3D NULL, +#ifdef CONFIG_SYSCTL .adjust_global =3D a653sched_adjust_global, +#endif =20 .dump_settings =3D NULL, .dump_cpu_state =3D NULL, diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c index 13fdf57e57..ea95dea65a 100644 --- a/xen/common/sched/core.c +++ b/xen/common/sched/core.c @@ -2112,6 +2112,7 @@ long sched_adjust(struct domain *d, struct xen_domctl= _scheduler_op *op) return ret; } =20 +#ifdef CONFIG_SYSCTL long sched_adjust_global(struct xen_sysctl_scheduler_op *op) { struct cpupool *pool; @@ -2140,6 +2141,7 @@ long sched_adjust_global(struct xen_sysctl_scheduler_= op *op) =20 return rc; } +#endif /* CONFIG_SYSCTL */ =20 static void vcpu_periodic_timer_work_locked(struct vcpu *v) { diff --git a/xen/common/sched/credit.c b/xen/common/sched/credit.c index a6bb321e7d..6dcf6b2c8b 100644 --- a/xen/common/sched/credit.c +++ b/xen/common/sched/credit.c @@ -1256,6 +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 static int cf_check csched_sys_cntl(const struct scheduler *ops, struct xen_sysctl_scheduler_op *sc) @@ -1298,6 +1299,7 @@ csched_sys_cntl(const struct scheduler *ops, out: return rc; } +#endif /* CONFIG_SYSCTL */ =20 static void *cf_check csched_alloc_domdata(const struct scheduler *ops, struct domain *dom) @@ -2288,7 +2290,9 @@ static const struct scheduler sched_credit_def =3D { =20 .adjust =3D csched_dom_cntl, .adjust_affinity=3D csched_aff_cntl, +#ifdef CONFIG_SYSCTL .adjust_global =3D csched_sys_cntl, +#endif =20 .pick_resource =3D csched_res_pick, .do_schedule =3D csched_schedule, diff --git a/xen/common/sched/credit2.c b/xen/common/sched/credit2.c index 0a83f23725..0b3b61df57 100644 --- a/xen/common/sched/credit2.c +++ b/xen/common/sched/credit2.c @@ -3131,6 +3131,7 @@ csched2_aff_cntl(const struct scheduler *ops, struct = sched_unit *unit, __clear_bit(__CSFLAG_pinned, &svc->flags); } =20 +#ifdef CONFIG_SYSCTL static int cf_check csched2_sys_cntl( const struct scheduler *ops, struct xen_sysctl_scheduler_op *sc) { @@ -3162,6 +3163,7 @@ static int cf_check csched2_sys_cntl( =20 return 0; } +#endif /* CONFIG_SYSCTL */ =20 static void *cf_check csched2_alloc_domdata(const struct scheduler *ops, struct domain *dom) @@ -4232,7 +4234,9 @@ static const struct scheduler sched_credit2_def =3D { =20 .adjust =3D csched2_dom_cntl, .adjust_affinity=3D csched2_aff_cntl, +#ifdef CONFIG_SYSCTL .adjust_global =3D csched2_sys_cntl, +#endif =20 .pick_resource =3D csched2_res_pick, .migrate =3D csched2_unit_migrate, diff --git a/xen/common/sched/private.h b/xen/common/sched/private.h index c0e7c96d24..d6884550cd 100644 --- a/xen/common/sched/private.h +++ b/xen/common/sched/private.h @@ -356,8 +356,10 @@ struct scheduler { struct sched_unit *unit, const struct cpumask *hard, const struct cpumask *soft); +#ifdef CONFIG_SYSCTL int (*adjust_global) (const struct scheduler *ops, struct xen_sysctl_scheduler_op *sc); +#endif void (*dump_settings) (const struct scheduler *ops); void (*dump_cpu_state) (const struct scheduler *ops, int cpu); void (*move_timers) (const struct scheduler *ops, @@ -510,11 +512,13 @@ static inline int sched_adjust_dom(const struct sched= uler *s, struct domain *d, return s->adjust ? s->adjust(s, d, op) : 0; } =20 +#ifdef CONFIG_SYSCTL static inline int sched_adjust_cpupool(const struct scheduler *s, struct xen_sysctl_scheduler_op *op) { return s->adjust_global ? s->adjust_global(s, op) : 0; } +#endif =20 static inline void sched_move_timers(const struct scheduler *s, struct sched_resource *sr) diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h index 5ac99904c4..6e1789c314 100644 --- a/xen/include/xsm/xsm.h +++ b/xen/include/xsm/xsm.h @@ -57,7 +57,9 @@ 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 int (*sysctl_scheduler_op)(int op); +#endif int (*set_target)(struct domain *d, struct domain *e); int (*domctl)(struct domain *d, unsigned int cmd, uint32_t ssidref); int (*sysctl)(int cmd); @@ -244,10 +246,12 @@ static inline int xsm_domctl_scheduler_op( return alternative_call(xsm_ops.domctl_scheduler_op, d, cmd); } =20 +#ifdef CONFIG_SYSCTL static inline int xsm_sysctl_scheduler_op(xsm_default_t def, int cmd) { return alternative_call(xsm_ops.sysctl_scheduler_op, cmd); } +#endif =20 static inline int xsm_set_target( xsm_default_t def, struct domain *d, struct domain *e) diff --git a/xen/xsm/dummy.c b/xen/xsm/dummy.c index d46413ad8c..8d44f5bfb6 100644 --- a/xen/xsm/dummy.c +++ b/xen/xsm/dummy.c @@ -19,7 +19,9 @@ static const struct xsm_ops __initconst_cf_clobber dummy_= ops =3D { .domain_create =3D xsm_domain_create, .getdomaininfo =3D xsm_getdomaininfo, .domctl_scheduler_op =3D xsm_domctl_scheduler_op, +#ifdef CONFIG_SYSCTL .sysctl_scheduler_op =3D xsm_sysctl_scheduler_op, +#endif .set_target =3D xsm_set_target, .domctl =3D xsm_domctl, #ifdef CONFIG_SYSCTL diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c index 45c12aa662..a7cb33a718 100644 --- a/xen/xsm/flask/hooks.c +++ b/xen/xsm/flask/hooks.c @@ -626,6 +626,7 @@ static int cf_check flask_domctl_scheduler_op(struct do= main *d, int op) } } =20 +#ifdef CONFIG_SYSCTL static int cf_check flask_sysctl_scheduler_op(int op) { switch ( op ) @@ -640,6 +641,7 @@ static int cf_check flask_sysctl_scheduler_op(int op) return avc_unknown_permission("sysctl_scheduler_op", op); } } +#endif /* CONFIG_SYSCTL */ =20 static int cf_check flask_set_target(struct domain *d, struct domain *t) { @@ -1887,7 +1889,9 @@ static const struct xsm_ops __initconst_cf_clobber fl= ask_ops =3D { .domain_create =3D flask_domain_create, .getdomaininfo =3D flask_getdomaininfo, .domctl_scheduler_op =3D flask_domctl_scheduler_op, +#ifdef CONFIG_SYSCTL .sysctl_scheduler_op =3D flask_sysctl_scheduler_op, +#endif .set_target =3D flask_set_target, .domctl =3D flask_domctl, #ifdef CONFIG_SYSCTL --=20 2.34.1