[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] x86/domctl: Conditionalise x86 domctl using DCE rather than ifdef
- To: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
- Date: Tue, 10 Feb 2026 18:23:48 +0100
- 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)
- 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=yzLf1HJy025YObr3l5sYuEY4ZZwt/s7E8Ls4LQGV/i8=; b=fQSIsqXjrr91+oOiIy0gM/e9WhkMIcRdjA5iWArOWQevtqTyEaqknav0gQBDJ1u6otIEeu+M/KnpW4P/YlfjRHMVE+2HOf6yh5rkIFUaMxqzfLztlsHvYmOITrn731PflCcu7O4yskEHj9oRArAjkTmfYXrYMQuiR/p2Kb0PkWb1m3d7PjZ9aJzMiws92lPQihTgp4aQfWbqYkIT0CUKearGN6+kz4YVkhcpbONIXyLDePwagXI4l+DXRr1oncwCwTKeadorLYcO8636uAVzVWP0xiwLza2o76tbgmKOvFlG6Zr4fIAd9qq0aSXV91YEgBrNRQQP210NDQUveIaM+A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iW7Aqw0NDV1qYK/ajsumP72m5KoCK53KJtQ8o6rbsaieSwHTz438lE7J34b5wRdeCfSle7pT9GP2Yinjzl7+G6JbSnj7eOphturXAc6cUdtEO4Em2qbSWRmFwcFCXk4/Idpyrv5fS2k5kFK+iHSVGGcFK02XrzC7Fwkotgxo8I2tma6A1EuMCzxUMH2Rw0hZLJxfpSrMA3f+nowMBv8X23j741BfmCSv1I/7XY+2tWxP6AusI+jy2tprdpvZMwsliKMBj6fzOwbWUcB570UNe7XMjtB/FnfX+zSNUXh/kLzq7t2G8d9t6/vBGW8W0RylxW599Rtf6ba8/PTO5ExgOw==
- Cc: Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Tue, 10 Feb 2026 17:24:05 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Tue Feb 10, 2026 at 4:10 PM CET, Alejandro Vallejo wrote:
> Make them uniformly return EOPNOTSUPP when their dependent features
> are absent. Otherwise the compiler loses context and they might return
> ENOSYS instead.
>
> debug_op, mem_sharing_op and psr_alloc change behaviour and return
> EOPNOTSUPP when compiled out, rather than ENOSYS.
>
> While at it, remove the public headers from mem_sharing.h (forward
> declarations are fine) and add a missing xen/sched.h include (for
> complete struct domain definition).
>
> Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
> ---
> xen/arch/x86/domctl.c | 27 +++++++++++++++-----------
> xen/arch/x86/include/asm/mem_sharing.h | 11 +++++++----
> 2 files changed, 23 insertions(+), 15 deletions(-)
>
> diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
> index d9521808dc..7066a18735 100644
> --- a/xen/arch/x86/domctl.c
> +++ b/xen/arch/x86/domctl.c
[snip]
> case XEN_DOMCTL_psr_alloc:
> + ret = -EOPNOTSUPP;
> + if ( IS_ENABLED(CONFIG_X86_PSR) )
This was supposed to be !IS_ENABLED(), obviously.
Cheers,
Alejandro
|