From patchwork Fri Feb 23 16:21:51 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: 775136 Delivered-To: patch@linaro.org Received: by 2002:adf:a356:0:b0:33b:4db1:f5b3 with SMTP id d22csp434651wrb; Fri, 23 Feb 2024 08:36:27 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUd6wqVlkiFR8xD9fSjJelo8dvU5C0bJnR1RxUxKYZaTIM5QH4RwydhUrB9HesJMf+fHCJP0r2ohDMqBNbY9AeR X-Google-Smtp-Source: AGHT+IHtnzkcPJN6UsWhZ34fxoYSYZc6fxtyqQiV9GsRTNhZLwIu7352hPcowGKY9wUwFpLHBP3N X-Received: by 2002:a0c:e213:0:b0:68f:88c0:7854 with SMTP id q19-20020a0ce213000000b0068f88c07854mr299290qvl.34.1708706187302; Fri, 23 Feb 2024 08:36:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708706187; cv=none; d=google.com; s=arc-20160816; b=tWbUehL+oTZTr3j52N5W6VHIWTaFKWMQAojwBPWxdqJux2F8qxzYUhdfILEwDQ+W47 NGs6S3P+XNqpouDXpDCc/Grqh7cNCp8VXBuC8pLdpIU9Q3N1oFOSvb+QbXtUaO7RZYSD 7+QNdpAEL7nsui9dJxOR1Sh9zsSQqc8gFGAdbFc8WBzxNB7JAKDL5nA//a357H33Kia2 a1XQtupprswQcTwXmA3l0znr7zQ3N0yu0DKDIn+dq+GLbSccR88d8G5MmE3+KtwZ82lx CIkEMqg7golr0Va4KuG9FAlCf41EaUKhi+1yW7Pun90MAwR9yerBoIPLCQako+wxBeEU gOvg== 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=/YEu+IjZM84YWRDAuPeJeqMoLNTdSzM/iYv/jybOCWk=; b=byIH03T3XYmg9gfmXXyEnX+EPwubeLsWpcWX5eZIYlft5k4gvYpQEH4I1wrDQ/cs/E GDFBfbNbQDpcSa+g6fz1VYzUeIPwhXyubIrhThMPs3T8bJgRqS5mCDqhZlPvy4nqodMU 1s+YEIZ1TLiOTVLepe0W+qmus/TbhQZTZvbLSoXSiwieYBHgETI5EqordQlErDdkBL2S Tr9JNL7RlHZBOIkOBP8rKOqVycpdwC2a/r02D/cawZOnLhosz/e7Xh/R2hHA2DSZ/kma AzDUEK2yT0AklsRva8xmM0otbfRPeqU2i8m+8Yu1OebI7ylIeEgGMR+c42riYkL+4sfE YLXw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gr609NOK; 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 kj20-20020a056214529400b0068fe47a64cdsi403115qvb.331.2024.02.23.08.36.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Feb 2024 08:36:27 -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=gr609NOK; 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 1rdYVr-0000gO-VT; Fri, 23 Feb 2024 11:35:04 -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 1rdYJx-0004IK-SP for qemu-devel@nongnu.org; Fri, 23 Feb 2024 11:22:45 -0500 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rdYJU-00068f-RV for qemu-devel@nongnu.org; Fri, 23 Feb 2024 11:22:45 -0500 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2d269b2ff48so6324251fa.3 for ; Fri, 23 Feb 2024 08:22:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708705335; x=1709310135; 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=gr609NOKI+9ho6OomofVKW8jj7VnF8pSJiKrKtVhlCJCLLiOBiFFqAr+kDHpJL8RZ3 gAv/4a4cUupPGzsNUFHw3kS4CYlQqvrieIcOZaNLJu5+jR4o6vJzYj7yYbWQZ8ZmKptW sKA9nrhsAxFIXJ94YuXB8yxUHgFhYXsDZaJ8N6+SIP/+dW3aDMu5e5wnKfkf4VN7Y05+ Chmvqezaklq5wgHkpSATTbaQb8NPcEhoURa8xf//2yir0db9NEww5nmNF7ANdxjJWYdo M8qmcI+8vKQMfXbI6YruB/OF0rMaWAFfzsSzlvYzdRkVdjRWpENtZJHTIPFGM98Nhslc YGfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708705335; x=1709310135; 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=EZVND5DY0JeFwk7hULqpizP0k//tTIpyKK3LAljKH7OjN4AuXTQGdKra+x/PtirAW4 JlraidVGT8PMuu9Tt+7RV5mKV9Neu3d0M8HVoIYqeY/d1R4fLugD5TrmROJo4JlChx8d jr0BX+CzEoUN7bH/mwMmHmuuI8LFP/Eeky1ZQLynn8dCmvlX+VuRdhZ6uNFdtjLBxAHG ha+7C8llY57UkHeYLpvnpMrjHgl4Ach8/6NhbvCX8gSagnrbsZ1eDkoIugoAE4fD9wJt iYX1/5R9kjClVOQ+0I/SBLqivBMVak9v1DqmmprHtxlhbIv4jMOA5OsA0o4Fo/E3Tltm cVtA== X-Gm-Message-State: AOJu0YzEEBrKKiQfAGj7ks/lWV2ipGXlM6DOYRNXskVCmJMyaKy+OTPP jGVF0zRg0UC3J+PtGpAwmpN8xLH8ucBXKHOF3OXUv8fDP+mmoFZWDOwmEcYNrzs= X-Received: by 2002:a2e:be8b:0:b0:2d2:2fc3:7b03 with SMTP id a11-20020a2ebe8b000000b002d22fc37b03mr255281ljr.41.1708705335232; Fri, 23 Feb 2024 08:22:15 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id l4-20020a5d5604000000b0033d4adb3ebbsm3293200wrv.26.2024.02.23.08.22.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 08:22:11 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 19A2F5F931; Fri, 23 Feb 2024 16:22:04 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Song Gao , qemu-s390x@nongnu.org, Liu Zhiwei , Pierrick Bouvier , Thomas Huth , Daniel Henrique Barboza , Bin Meng , Yanan Wang , Laurent Vivier , qemu-ppc@nongnu.org, David Hildenbrand , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Ilya Leoshkevich , Cleber Rosa , Nicholas Piggin , Marcel Apfelbaum , Eduardo Habkost , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , =?utf-8?q?Alex_Benn=C3=A9e?= , Daniel Henrique Barboza , qemu-arm@nongnu.org, qemu-riscv@nongnu.org, Palmer Dabbelt , Mahmoud Mandour , John Snow , Weiwei Li , Alistair Francis , Yoshinori Sato , Brian Cain , Paolo Bonzini , "Edgar E. Iglesias" , Michael Rolnik Subject: [PATCH v2 16/27] linux-user: ensure nios2 processes queued work Date: Fri, 23 Feb 2024 16:21:51 +0000 Message-Id: <20240223162202.1936541-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240223162202.1936541-1-alex.bennee@linaro.org> References: <20240223162202.1936541-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22a; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x22a.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: