From patchwork Mon Feb 26 16:56:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 775887 Delivered-To: patch@linaro.org Received: by 2002:ab3:621a:0:b0:258:3251:9e33 with SMTP id w26csp1475758lte; Mon, 26 Feb 2024 09:01:50 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVgvYBKmtJ9dVpYz2UiTebHjnHacQ8ZBRESXfy0R42XgACFZAGMzpO6myqUMJRVKpAntsOw05y55ZThLgV9Vyms X-Google-Smtp-Source: AGHT+IGajpXHT/nF84dvb5Z4EYIepLp1pptAo7u6slqNIx/siBDrXU2NT/7FtcQehKwfDqq10NJt X-Received: by 2002:a05:620a:14ad:b0:787:91fc:f940 with SMTP id x13-20020a05620a14ad00b0078791fcf940mr9644510qkj.48.1708966910354; Mon, 26 Feb 2024 09:01:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708966910; cv=none; d=google.com; s=arc-20160816; b=IdF1NHGCDrXlTSOBUMgJkSkRjmH4J36IC8zHw/rvAYK349s6qBW7nwe7RD0Quuu1ki YxWGpGfTpPEHLwmRY52BYOWJz9aicMAYrsePYMMKno8zDzhrQZbUpUm59cIRObeEKwIj 2WUNLfpkzjg1TukV3jJoBECnTsaPQsLE/8aCPWJUI0rMYqVwFfi3mtpnImekXBvhtslB wI1mapqLLbFyNPf/AlgyPjWvlxKiPftufmHxdV5qdS4k4q5V3lFUEjN6KNWojEVi1B5N DZ4ScZXnUmdn7v7qgG9gTetTaL9ltVwAPFqAsjz5xeeW8Imrqb5hNLMiLKaNj0woUtyf fs+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DS/EGY2tGxoW2u4p636lnzJLhbzW+SUrMSj5Qfa0kZY=; fh=FlRWjczXzB3kjfNm0MZCBQ0e7zrqTwZz0mkKu1n+VQY=; b=ITi6eo/2CpwrSfdLfGPFw6J48YRaf8mbvJbP04HwZ+xKsBGj5c4DQMdQEofcVOBbfa qfZSc5gYTcjWMXN2wy6z4qZjzuP1uWUH7nmUBW+TtISzF5Bzonl3gc2YzE/4WZe83Ljt N2vkoet4eOdDC1zOx/bGXQJwXScpit+SaKu7XwhVr6R16IVuVBdney3wMI/u1GY03Wp1 hEGgiVTgzsCh6SuJLzh2Jm/1Rr6hu6cUjdsVJqHdyfH5ruvsKGvQJ2NWTxJQOOIFCIHH NwNxmlvkR8kbwMMahQTlYWpUy9l4pWNSYhaAqUbrgx/HksIkW42sbvD4JBhL0EN5rRzP QggA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZV3vCPUt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z18-20020a05620a101200b00787b14c3f31si5375576qkj.515.2024.02.26.09.01.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Feb 2024 09:01:50 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZV3vCPUt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1reeIk-000739-2N; Mon, 26 Feb 2024 11:58:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1reeIh-0006qi-NP for qemu-devel@nongnu.org; Mon, 26 Feb 2024 11:57:59 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1reeHv-0007lw-2r for qemu-devel@nongnu.org; Mon, 26 Feb 2024 11:57:59 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-412a9f5f797so960745e9.3 for ; Mon, 26 Feb 2024 08:57:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708966624; x=1709571424; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DS/EGY2tGxoW2u4p636lnzJLhbzW+SUrMSj5Qfa0kZY=; b=ZV3vCPUtz1IeVn0WCT7JjlsxfmyT+rLn56AsodqWxsmELVOOarHX5b/7flJMVjledJ HHccpSD/WPShDLKdWSc5e9XVvQppGW1lJ2F2+TCLR6Sox+tnTEkc22hpxyP23x6CpS24 p71u8GoCevZdhAFfvQYUFQ5je1lzrVKAwtl7MZ+46T5pIrKyUmSIHaXHwYQ7VfyMVJtU WuRWyc+b1FKz2TkQp5X8cCif8G1lN15WiCx5b/Vl4T8u+HFz8YF7g2RthKILErzijpDk bAhTC+5YwzM2Rkn3nqgxN7M7I9MeUj3EkRxAtfYMfKTl4Lz/cLruXQsloziMLyxx8+ld 2G6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708966624; x=1709571424; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DS/EGY2tGxoW2u4p636lnzJLhbzW+SUrMSj5Qfa0kZY=; b=C+1OMP9nOVbTQ2YK8TuckqpS/VlAkBGlyaIBud8xKROAl/ld5ardlUStkzRiu2o9hb 3WRrybj5Xy7r5EHGTnjPt5kS7ITuZfT64dlA5BRNemPv+tL4t8rPmi+isYuWw+vuVgSH lF5DqezO9DlvWchNt4aNjPZCqshMOoAmuiGiOhqFZUCZ+zYE4grtuh63FjzbSzZpX7TU G9h7l9U2S0xsSn2OfNf+XCpX77e+wce4XqY+L686EAu3hc1FnjgMuBQV5y+PuwUsAi/d m/pVhxWP1htUddD7WIlcbgW0qhdhc3vpJu4Dd/IrtsSG+Yh+7CDDenoV8t6/YmzJB95X 7Msg== X-Gm-Message-State: AOJu0Yyjc5PJ766mcB7DdSH1hM7ItQqDysY2DQIEC7i2zeXEjAE6yrYD E+NjzsP6kOwVvE42SBvX6uWZDuRhpuGvf8ku8V05LPTxc44UbhlKHzGtt1l7fFI= X-Received: by 2002:a05:600c:5198:b0:412:a9e1:ed8b with SMTP id fa24-20020a05600c519800b00412a9e1ed8bmr286685wmb.27.1708966624207; Mon, 26 Feb 2024 08:57:04 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id q8-20020a7bce88000000b004101543e843sm12440932wmj.10.2024.02.26.08.56.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 08:56:59 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 5A0285F929; Mon, 26 Feb 2024 16:56:48 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Liu Zhiwei , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Peter Maydell , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-riscv@nongnu.org, Michael Rolnik , Song Gao , Alexandre Iooss , Marcel Apfelbaum , David Hildenbrand , Pierrick Bouvier , John Snow , Eduardo Habkost , Mahmoud Mandour , qemu-arm@nongnu.org, =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Cleber Rosa , qemu-ppc@nongnu.org, Richard Henderson , qemu-s390x@nongnu.org, Daniel Henrique Barboza , Thomas Huth , Yoshinori Sato , Yanan Wang , Brian Cain , Ilya Leoshkevich , Weiwei Li , "Edgar E. Iglesias" , Bin Meng , Laurent Vivier , Palmer Dabbelt , Daniel Henrique Barboza , Alistair Francis Subject: [PATCH v3 16/27] linux-user: ensure nios2 processes queued work Date: Mon, 26 Feb 2024 16:56:35 +0000 Message-Id: <20240226165646.425600-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240226165646.425600-1-alex.bennee@linaro.org> References: <20240226165646.425600-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org While async processes are rare for linux-user we do use them from time to time. The most obvious one is tb_flush when we run out of translation space. We will also need this when we move plugin vcpu_init to an async task. Fix nios2 to follow its older, wiser and more stable siblings. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- linux-user/nios2/cpu_loop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/nios2/cpu_loop.c b/linux-user/nios2/cpu_loop.c index da77ede76bd..7fe08c87501 100644 --- a/linux-user/nios2/cpu_loop.c +++ b/linux-user/nios2/cpu_loop.c @@ -32,6 +32,7 @@ void cpu_loop(CPUNios2State *env) cpu_exec_start(cs); trapnr = cpu_exec(cs); cpu_exec_end(cs); + process_queued_cpu_work(cs); switch (trapnr) { case EXCP_INTERRUPT: