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 F08F2EB48EC for ; Thu, 12 Feb 2026 09:40:08 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1228578.1534725 (Exim 4.92) (envelope-from ) id 1vqTAr-0005Q8-Ho; Thu, 12 Feb 2026 09:39:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1228578.1534725; Thu, 12 Feb 2026 09:39:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vqTAr-0005Q1-F0; Thu, 12 Feb 2026 09:39:49 +0000 Received: by outflank-mailman (input) for mailman id 1228578; Thu, 12 Feb 2026 09:39:48 +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 1vqTAq-0005Pv-AS for xen-devel@lists.xenproject.org; Thu, 12 Feb 2026 09:39:48 +0000 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [2a00:1450:4864:20::535]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id c478b830-07f6-11f1-b162-2bf370ae4941; Thu, 12 Feb 2026 10:39:46 +0100 (CET) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-6581234d208so10591802a12.3 for ; Thu, 12 Feb 2026 01:39:46 -0800 (PST) Received: from [192.168.1.6] (user-109-243-67-101.play-internet.pl. [109.243.67.101]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-65a3cf50e38sm1526324a12.33.2026.02.12.01.39.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Feb 2026 01:39:45 -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: c478b830-07f6-11f1-b162-2bf370ae4941 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770889186; x=1771493986; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=apUhlxAvd4x8zuB7ub7Bs0AjAqJPi31qMLk+fS6Pepk=; b=QTj5QUA4rIpVzVqaNTHwL3Zk7g7oqlj8To1eQMnh7fy23DuhsCQXS0N+PDFtjLQJLr TGaYaFpLauOB/OyxKvdmHVRq3ulcDUvKJr8JA9eLJ7wM1zOEtDf30u8cmA3JYjeDU6x0 t6b0pOhe4Go11N/Tl/2OVIjgsaotpz1qC7YrJF15C+G6a3yezW1b4TtjaaIzQMXGX5ly M92Fl6n+oGZrZgUENqJo5SNiHg4AwRlAn2P8xqKIEbRxhxGgcuJfZFxSabZfWvVHS6AW IbGDn18VSvvU3WVhxjwJMMTnQ9sfjZdIlvyEoJgB8UwRkvydraUNRh3s27SoSiqIRYmP rRGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770889186; x=1771493986; h=content-transfer-encoding:in-reply-to: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=apUhlxAvd4x8zuB7ub7Bs0AjAqJPi31qMLk+fS6Pepk=; b=nTqUlkuWMqnZKMldXgVoDEO1s8OE5gjbbeyIeFEVyYophpJHD8DkxT+/arYA8ByLzk clmrqaHd6TX0m98pXh1f4lqY3T1k2XAo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d7 with SMTP id 4fb4d7f45d1cf-65b96def65bmr1176917a12.24.1770889185818; Thu, 12 Feb 2026 01:39:45 -0800 (PST) Message-ID: <972837f3-fa50-4ec8-ac4f-4b6edabb42bf@gmail.com> Date: Thu, 12 Feb 2026 10:39:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] sched: move vCPU exec state barriers To: Jan Beulich Cc: Julien Grall , Stefano Stabellini , Volodymyr Babchuk , Bertrand Marquis , Michal Orzel , Juergen Gross , Dario Faggioli , George Dunlap , "xen-devel@lists.xenproject.org" References: <1e2df446-b116-4861-a396-b87895a96c67@suse.com> <1beb7c04-5c21-4ba2-a74e-467f659224e5@gmail.com> <436bb64f-39d9-4b01-9f50-7a734f3e6764@suse.com> Content-Language: en-US From: Oleksii Kurochko In-Reply-To: <436bb64f-39d9-4b01-9f50-7a734f3e6764@suse.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2/6/26 4:02 PM, Jan Beulich wrote: > On 06.02.2026 13:57, Oleksii Kurochko wrote: >> On 2/5/26 12:33 PM, Jan Beulich wrote: >>> The barrier in vcpu_context_saved() is specifically about the clearing of >>> ->is_running. It isn't needed when we don't clear the flag. >>> >>> Furthermore, one side of the barrier being in common code, the other would >>> better be, too. This way, all architectures are covered (beyond any >>> specific needs they may have). >> Don't we want then move ... >> >>> Signed-off-by: Jan Beulich >>> >>> --- a/xen/arch/arm/domain.c >>> +++ b/xen/arch/arm/domain.c >>> @@ -333,17 +333,7 @@ void sync_local_execstate(void) >>> >>> void sync_vcpu_execstate(struct vcpu *v) >>> { >>> - /* >>> - * We don't support lazy switching. >>> - * >>> - * However the context may have been saved from a remote pCPU so we >>> - * need a barrier to ensure it is observed before continuing. >>> - * >>> - * Per vcpu_context_saved(), the context can be observed when >>> - * v->is_running is false (the caller should check it before calling >>> - * this function). >>> - */ >>> - smp_rmb(); >>> + /* Nothing to do -- no lazy switching */ >>> } >> ... to common code with ability to re-define sync_vcpu_execstate() by arch >> as only x86 does something inside this function? > Indeed this was considered already, as a possible next step. Oh, I missed that you wrote that in Arm-connected patch. Sorry for the noise then. Then this patch looks good to me: Reviewed-by: Oleksii Kurochko ~ Oleksii