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 CE617E81A36 for ; Mon, 16 Feb 2026 15:29:35 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1234277.1537579 (Exim 4.92) (envelope-from ) id 1vs0XM-0008LH-Cr; Mon, 16 Feb 2026 15:29:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1234277.1537579; Mon, 16 Feb 2026 15:29:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vs0XM-0008LA-8p; Mon, 16 Feb 2026 15:29:24 +0000 Received: by outflank-mailman (input) for mailman id 1234277; Mon, 16 Feb 2026 15:29:22 +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 1vs0XK-0008L4-P9 for xen-devel@lists.xenproject.org; Mon, 16 Feb 2026 15:29:22 +0000 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [2a00:1450:4864:20::335]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 43af359d-0b4c-11f1-9ccf-f158ae23cfc8; Mon, 16 Feb 2026 16:29:20 +0100 (CET) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4837907f535so21016725e9.3 for ; Mon, 16 Feb 2026 07:29:20 -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 5b1f17b1804b1-4834d82a4afsm816242135e9.11.2026.02.16.07.29.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Feb 2026 07:29:19 -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: 43af359d-0b4c-11f1-9ccf-f158ae23cfc8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1771255760; x=1771860560; 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=r0r/gv63b+F/1y4hzeaB7Qza8hG14SCQCXFgHh3+wwY=; b=IHze7VIjqFu647KxluSGxYXueJfnkmgT39FBIwrvv//KHcTpu83Nxsuig8DfE8gyT4 0Qm7KZ4qc0BCUvnJ747WfHz7Z1f+7/WLjGkd+JjHU47JruD4aB4pbqFjEHdf8SN3aHG4 s0ROEyTO4j7laJ8tINWgrEGp2NzQlZFl5nXRfUnOGD+0Mb26qPGfv76mqEgC4rIjH2w0 3rHK3aZTejTQ0wKHA6X8GduuE9ai7ZMTpJdU5UoFCTgcUZ66nBbUnJGUmTFkHlErBoDA v5G8dYVOQHJb250219rTc2I2btR1mSphzM/kaUpm+7eRlFEBsNrsyPpk1wxZpQAQ1ZKy eG4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771255760; x=1771860560; 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=r0r/gv63b+F/1y4hzeaB7Qza8hG14SCQCXFgHh3+wwY=; b=vZqzKClV0uhLBL8wvaN7yREyDVBfNZyRsgVQhfWNaAHfWMojFAhnMW78pkViJfL3LL F3HLUj219ct1/7iU6eY/m/A5TkJN4ro3nPKPwgeFp7QrZZTG5DBSlKf0yZiw+RSFNKMZ xKM1NLGjvRbOlcdlfVt5zT69MCHt69VJ0f5I+xkSsdMjAaJPzSiuVJDkwNAaZSYvNNZw y9O8HXAPL+T/aQHnieEURPs7jMEVIaC4bs/SB4gTgFziTlsxjRLbcmYmko/795TVlFhc CJBmRBnzg8zofxTzxSkPfEAXyaAxN8Nra2VLouJlc6V3COJTq2rZXdihloHTrScvN/YV ivVw== X-Gm-Message-State: AOJu0YyQG8FK+MLnWayJkQQbXWy5ExeYX4tixzQhtErPsheOLLcZUooz x77uk7P1CsxGhckyd4znEGTsmWQaUlPfIfBWbM670zJTDQkMKXXPVXWUkTsARmYFWw== X-Gm-Gg: AZuq6aLuaOUjyjH0QD8x5zTQ4t6A+E/Nz/2QvVB5B6csvsf4vMt6NvKP7cmzqZ0dwVx tgAd+MVpt6xC5e/y6Edu3m8lH1xBaj9tfdFJDoJvHaHJU+1Zb+4wLPU/HKe1MvTLblnOYSRbqoX FxCkzsuIGe0nie5//aflzrDBeDAmKnVS/Pr47L6WCAYygX58monMi+SPDVbaw60pGDc7ZLJSJ2S 4vWdjsi255+UDDUrczb+utj/Lt+l6epvIURo+/J7+a/VclHOXNG5SDDWZv35sP8oQ07bguZSqgK wTEwrStOqownpYItU1+H1rgw4Nblb0b3Jw2bZb6106paxyfu/6iwVXqhLFmHO/ZDkX864BTxBL6 rZfqjhaFFkh9/ZBLiicj+r80e1mvlmmKIpMh7hRavbeYIlCbnjh1WjnX+89ZEqKRYSO2L0bhcel ndunc0DK7u/EkAkYjfTMscMWLkGWTsE9sJM8lRTeFS4oXIu8VsXO8UNWrB6BDnQF94xUmKymr37 a6DQ4/IQ/kmhCM= X-Received: by 2002:a05:600c:6814:b0:47e:e78a:c834 with SMTP id 5b1f17b1804b1-48379bf4788mr132573435e9.34.1771255760109; Mon, 16 Feb 2026 07:29:20 -0800 (PST) Message-ID: Date: Mon, 16 Feb 2026 16:29:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] domain: skip more stuff for idle's vCPU-s in vcpu_create() To: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Cc: "xen-devel@lists.xenproject.org" , Andrew Cooper , Julien Grall , Stefano Stabellini , Anthony PERARD , Michal Orzel References: 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 16.02.2026 16:06, Roger Pau Monné wrote: > On Wed, Nov 26, 2025 at 11:31:46AM +0100, Jan Beulich wrote: >> Nothing hypercall-related needs setting up there. Nor do we need to >> check whether the idle domain is shutting down - it never will. >> >> Signed-off-by: Jan Beulich >> --- >> For vmtrace_alloc_buffer() adding the conditional may be questionable: The >> function checks d->vmtrace_size first thing, bailing immediately when it's >> zero (which it always will be for the idle domain). > > Oh, I notice this now (after having written the comment below). I > would then add a comment rather than the extra check. And possibly an > ASSERT(!is_idle_domain(d)); inside of `vmtrace_alloc_buffer()` after > the vmtrace_size check. Hmm, we could move the call anyway, as you ... >> @@ -450,7 +450,7 @@ struct vcpu *vcpu_create(struct domain * >> if ( sched_init_vcpu(v) != 0 ) >> goto fail_wq; >> >> - if ( vmtrace_alloc_buffer(v) != 0 ) >> + if ( !is_idle_domain(d) && vmtrace_alloc_buffer(v) != 0 ) >> goto fail_wq; > > There's an existing issue here, the usage of fail_rq is wrong here. > It should use fail_sched instead. However I wonder whether we want to > move the `vmtrace_alloc_buffer()` call inside the existing `else {` > branch of the is_idle_domain() condition, as to avoid this extra > is_idle_domain() check here? ... suggest here, thus dealing with the wrong label use at the same time. Since this change will want backporting, I guess I'll move that to a separate patch, though. (I don't think I'll bother with adding an assertion in the function.) Jan