Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 50169D3B7EA for ; Tue, 9 Dec 2025 13:08:26 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1181660.1504683 (Exim 4.92) (envelope-from ) id 1vSxRw-0008Eg-G7; Tue, 09 Dec 2025 13:08:16 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1181660.1504683; Tue, 09 Dec 2025 13:08:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vSxRw-0008EZ-D9; Tue, 09 Dec 2025 13:08:16 +0000 Received: by outflank-mailman (input) for mailman id 1181660; Tue, 09 Dec 2025 13:08:14 +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 1vSxRu-0008ET-Iu for xen-devel@lists.xenproject.org; Tue, 09 Dec 2025 13:08:14 +0000 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [2a00:1450:4864:20::42c]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 1d83feb0-d500-11f0-9cce-f158ae23cfc8; Tue, 09 Dec 2025 14:08:12 +0100 (CET) Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-42e2ba54a6fso1907124f8f.3 for ; Tue, 09 Dec 2025 05:08:12 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42f7d222506sm33659189f8f.28.2025.12.09.05.08.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Dec 2025 05:08:11 -0800 (PST) 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: 1d83feb0-d500-11f0-9cce-f158ae23cfc8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1765285692; x=1765890492; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=pMiVUzm8asTDH+CVtzYaOPE+6g1fAOaVu1cBSl+DPY4=; b=cS3YolBzUwghkOodWo9Lp3FohOcTNT+TcMYpL4x2RRKRG1qf3dicvBFdFynxs1Pb3n m8x2RYURZnRTvUW1vF/yfyS75JhUPAb4mqPyM8Pveme8NaVZTpL+rvgLzLOJXJ/uTEgC PiaP5YgD/srRRqmD0Uf3YeVrXkz9t6PCiONw6Du5qGVM2fXN1dxYbNjHW04aTR4jfV8d 8S7MWeWXk8jE0lbBrXNcbkCH70pBKoYfkh3ycp9mXc+f7+CS33WR09yCEt5Fx4Lw+2EI DwsaQ4WCxm4SWjsYeJ12v6azTVoGdMoYI3XpP0Wmj+zl61wDDSk5RLP0Qbleu53nBe4U HuHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765285692; x=1765890492; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=pMiVUzm8asTDH+CVtzYaOPE+6g1fAOaVu1cBSl+DPY4=; b=ap7WNw6K1vnw6GyyELUW8gaqX+xsSvZBq+ophzcQL5Wl7rVQ2tk1Vj5xPCgMBGpO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-Smtp-Source: AGHT+IFH+XZl2ULnlq0TQ77CqtWVsTgKBvaDJSspeH/H1vYPH7FfxcE3DwZmG3HGmZs/hGT0zfSsfA== X-Received: by 2002:a05:6000:bc1:b0:42f:9faf:4170 with SMTP id ffacd0b85a97d-42f9faf42eemr1601806f8f.31.1765285691639; Tue, 09 Dec 2025 05:08:11 -0800 (PST) Message-ID: <2f8eba17-2fa0-47d0-8970-dba21ccd2759@suse.com> Date: Tue, 9 Dec 2025 14:08:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/4] domctl: Provide appropriate error code when PIRQs are not supported To: Milan Djokic Cc: Andrew Cooper , Anthony PERARD , Michal Orzel , Julien Grall , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Stefano Stabellini , "Daniel P. Smith" , "xen-devel@lists.xenproject.org" References: <88ab7d88-9b25-418c-bc5a-fc080c5e78ff@suse.com> Content-Language: en-US From: Jan Beulich Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 09.12.2025 13:48, Milan Djokic wrote: > On 12/8/25 14:08, Jan Beulich wrote: >> On 05.12.2025 21:36, Milan Djokic wrote: >>> When PIRQs are not supported (e.g. for arm), XEN_DOMCTL_irq_permission >>> command is not handled. >>> This results with default (-ENOSYS) error code returned to control domain. >>> Update command handling to return -EOPNOTSUPP if control domain >>> invokes it by mistake when PIRQs are not supported. >> >> Did you consider simply replacing the bogus ENOSYS by EOPNOTSUPP? (Assuming >> the difference in error code really makes a difference to callers.) > > Yes, this is the simplest approach. I didn’t do it because I wanted to > keep a distinction between commands that are part of the Xen interface > but not supported on the current configuration/platform, and commands > that don’t exist at all. I also tried to follow the existing pattern, > where unsupported commands are handled explicitly rather than falling > through to the default case (e.g. set_llc_colors, soft_reset, etc). > If this distinction isn’t useful, then yes, I can definitely just rely > on a default-case error. Before you (possibly) follow this route, maybe I should mention that there have been discussions around this in the past (sorry, no pointers, too long ago). IOW ahead of any consolidation (and making things consistent), imo as a community we need to settle on where exactly we consider ENOSYS valid to be used. My take is that almost all of the uses we (still) have are wrong. In particular all the ones for "unknown sub-op". Jan