From patchwork Tue Feb 20 17:08:03 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: 774282 Delivered-To: patch@linaro.org Received: by 2002:a5d:4943:0:b0:33b:4db1:f5b3 with SMTP id r3csp1759716wrs; Tue, 20 Feb 2024 09:08:53 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVA3hvegcsu8kvfL12c39LPfQdGAPxHJsFAR9gD4xhcN6FAN5165Y/LZxkllznBbMCdmdjB1r5mFLn9WMyAFfzj X-Google-Smtp-Source: AGHT+IFXsphL60RAa3nDlg1HJzKm3G+LJbYAJYz5B6LJhuQ4xyxjQoTtJH5h22Ooz78UcjLB3rpr X-Received: by 2002:a05:622a:138e:b0:42e:5d:ebb6 with SMTP id o14-20020a05622a138e00b0042e005debb6mr10985857qtk.11.1708448933371; Tue, 20 Feb 2024 09:08:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708448933; cv=none; d=google.com; s=arc-20160816; b=mYHdhPfSUjGivutlRZf0Z9uNV9QMGjFbWKmCvk8SqfX/5JJoivd9rLN6hWCa4w9TQI xzot9XZ6PZZBCk2NVkclhMmTh0SVuDbezKH94xWGZbvElWelUzS80aS5nrK3I5MEOh4z mIfO3RMusl+Fh+DhuL/Sxk8iz/jcusIZR8EKxJsGe6d9usUAX06W2Q+Qnj6W4bBFyuC+ ph6HyW9k16Z/iV+HHYHw0OUurRNPDrGzgRkRPhF3AODHUXPW8bFQ3qM00t+EDJ5tuzSt 01Y49vnmptm/4LLJ4rRrnLgF6eKe4GqL0ZnSveRkIrNzOuao8L3h84mfup7BRxZElzFv EbmA== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=4x4OmAqRmJ8/NCsb6tveV7GR/cM5COawqpxVQsuths0=; fh=csTZnrn3g9ASUrHqj1XbLV+vl17eHh1xeFyOr/3YpTM=; b=wOHdxF2jz0604xP2a0FlKVWfnAG87YFXgRGXV/ErWqLP70TVs9VnLxAo2r3M3m+eTb BJLLszjpn61ZgfL+3uKe+0/TlB2Qj/fWNntqe2yVcryJfPW8M/3Q5WE58m/Kc0+/llxe yDrBzxiCq32FkLCbzC49zkWQ3PrcR5y8DbKSD6Du5dQoFz3cY0D+tlt902fHelZXTpTE JPciAS/UQqql8SepB5YP6BNTVBJ13wFwpoaOGKustjlmKqnBsBv8EW+bBa3Eu9XssvSq H+/hdSg7pYTiMwL/o3l4QppiCQ/xYB3n7q5OAph37PGmwN13k+85iV+eu3RP2RNil5D8 6Y0A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SoicNDZl; 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 u5-20020ac858c5000000b0042e2da19106si1222859qta.807.2024.02.20.09.08.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Feb 2024 09:08:53 -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=SoicNDZl; 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 1rcTbJ-0005gd-PC; Tue, 20 Feb 2024 12:08:13 -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 1rcTbI-0005g3-D9 for qemu-devel@nongnu.org; Tue, 20 Feb 2024 12:08:12 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rcTbF-0007Uu-Tp for qemu-devel@nongnu.org; Tue, 20 Feb 2024 12:08:12 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-33d2b354c72so2299225f8f.1 for ; Tue, 20 Feb 2024 09:08:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708448888; x=1709053688; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=4x4OmAqRmJ8/NCsb6tveV7GR/cM5COawqpxVQsuths0=; b=SoicNDZl4IzdcodTXqp07QhJuw84BLYQxRDyPU7wDD7LIzPmcTXLszBZvyrak9AsMB 4RfFtSJVe5pn7048MoAgbUoeEv7aAxTz6PjpYqqWBd8JQFoGtGPNeU5vPS+aayUky0Mq SOLJHmvUifXReC2UdMmnKx5BN5iN7ZTwgqJmaScYESPU9CLKiSxA6OaArPV1fl7p4jCC hAaRve1oAmcZ8rM1yaiF54lqe9qjE7kmJybTXqolJAjT6h+3B79BQYs3KihbMhbomS0/ IdPI4QpPjCIul4URPfDUGi3GL5jOnIjpyMjeJ7Fku5fWbrR8NnGfAm28/d3QxLjVbRAj y3OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708448888; x=1709053688; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4x4OmAqRmJ8/NCsb6tveV7GR/cM5COawqpxVQsuths0=; b=cmTYhsXctfZp8V+pU9fHoT6yJD3PYLvBt8A0EXPkVPCSv8myFbEzSytg0AY9c8ilN8 kKYlnwuWpJnCwAb2UOyX/cD02RkZ8isKozRW+NLAVAoafonGhUn9Ee3EL74rvwvOvfVe DKjElsbru+M0tN94KYOOCRyFok9Tcbb3koc9WgRtcWW/YPmTK65ZQ/8WAvMUnmnKYn78 5hZh3Sb7recbMWdDunixZSg/7Ai9ghCDmG0t11kKo/Bjaxl++PK+EG+FDYQBIffFmOif NlC0NcCShJTukv8YFLsOMgXbNI7cOc7gVN5E2VG9afR5LRP7XRsejoY2FgRt1go5bANn tI0Q== X-Gm-Message-State: AOJu0YwsZo9BNRHGS6kJR9k+Kcf5j8fFQqRIADpEuB/+ZkDjkEwAnKZy /6Vf6TIAm9yX5l1G3g/9PEmNeStBrdYdypTQBl5KEIuUDYb0N7rzfkUh9wYq3hk= X-Received: by 2002:adf:db48:0:b0:33d:2a1e:99f5 with SMTP id f8-20020adfdb48000000b0033d2a1e99f5mr6416538wrj.23.1708448887779; Tue, 20 Feb 2024 09:08:07 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id b14-20020a05600010ce00b0033d06dfcf84sm13962281wrx.100.2024.02.20.09.08.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 09:08:07 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 1AAB15F85F; Tue, 20 Feb 2024 17:08:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier Subject: [RFC PATCH] linux-user: ensure nios2 processes queued work Date: Tue, 20 Feb 2024 17:08:03 +0000 Message-Id: <20240220170803.888143-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.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=ham 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: