From patchwork Wed Feb 28 11:56:50 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: 776484 Delivered-To: patch@linaro.org Received: by 2002:adf:e94d:0:b0:33d:f458:43ce with SMTP id m13csp256236wrn; Wed, 28 Feb 2024 04:09:42 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWXnkke4bRDh999ViPjCES2xVpLh70sDAaxtED4LKVytZLfZ5IS/u3Jl/YZ1xNt+iFefWdso+UlIT79dHbq1ZCt X-Google-Smtp-Source: AGHT+IF3jihfcvFZPcjtHX3Sih7+jfKQa1ASEYVwWzzTovT5tzGE/usMlsR3LbO58E6431r7FHV+ X-Received: by 2002:a05:620a:1998:b0:787:b833:7036 with SMTP id bm24-20020a05620a199800b00787b8337036mr3774351qkb.6.1709122182486; Wed, 28 Feb 2024 04:09:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709122182; cv=none; d=google.com; s=arc-20160816; b=o37TZyUIQQRqIzoAvgyzxJoFEVgheexY2aG81t3Y2pFenMy/0vxaYu6Dfzn3t+XUap WYb3vHKfHqw5uOyH9cAkkBN3LgMGwQ5LfltyADZxGDkNlQEhstYMLxe3F5NLyExP8pHC vAVnABTh91Y1ZSef0DiWftJbo0t7CphjynsQHX0go4CS63XG387tlsUFee866Q49yH7u 9igDwnNhvmyBkOCFDkvwBGOViCyKUlS0APxmv0S+5le93fGYmUsOElauCVhwfFmGY+ZX 5uQc4GO+ICHN1tzpWxQR2by278dURscVgfj2RBeU0zQxGcoR7knNhUUEF50RYzdyE+Vk W6hQ== 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=mr8xNnhDGY0/lMKUx04e9LXvXJNCxTVqWEKyAEz4psM=; fh=CHuNtIurDMBuhNI6pD8gCAtm0S9S/wC24WfpQfwaLzA=; b=swDK9V79VAEbsVEUXQ2MDcGsrZ5vumjq/cnR6UsBTKKxLL9SqWti5dIHEkIrwDom7C 5HAfvqdNrcYF9sf7Gju4qmSrLFb7Or8i9xWfhVt9ZD6E0InSg6nDMRx5Ev6nwXW1s35d SKI8r648uv6uYaGsGWGgYiwOAAciAdPP3geHY0FLpoC06xcq9A7MC5W48+h8WOoUHioT ggFgIakBF0xQFers8OqxBLVqWDPQxzkmj8rxYhwL3dOoiDBF+yn2InOiRetVjSKNG/98 G1zT9n5pTxnOxhvfu8+9KPT6qV1Ex918DwQsEPjKTnWK3iBR0h4sLi6RuQUfsPFhsJCn F1XA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f+A4ehjj; 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 wg13-20020a05620a568d00b00787bc601c72si9107146qkn.165.2024.02.28.04.09.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Feb 2024 04:09:42 -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=f+A4ehjj; 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 1rfIeZ-0005E0-7v; Wed, 28 Feb 2024 07:03:15 -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 1rfIeR-0004qM-8y for qemu-devel@nongnu.org; Wed, 28 Feb 2024 07:03:09 -0500 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rfIeP-000367-E0 for qemu-devel@nongnu.org; Wed, 28 Feb 2024 07:03:06 -0500 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-512bc0e8ce1so5767154e87.0 for ; Wed, 28 Feb 2024 04:03:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709121783; x=1709726583; 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=mr8xNnhDGY0/lMKUx04e9LXvXJNCxTVqWEKyAEz4psM=; b=f+A4ehjjMLGBP6JR8CMIOxaSAqnZvKkPFtzAD2sEMlkR2kIlI5e6GXD0SEMrCXQnzt OaylmzMhHCFoIYBfK2tH78nMtV/eR9Bucjhr9y+XN1V3JJ4hxz4jiT/4RTj7/TPbsvUL rLI+kxUtq2wzPathn23pC73/iqDYet1Q4CiiXCeMwVNgpkjHp8/TcuPNq8Gr2XBpKMlp QazevKcHpFs4KzrP6Ggcp7jxwBXg+Nmr/2JACD8kGxIn3pcRAIDSs+uXtz0STNZUFyZF 7xAih89/vWhkJu6qGX0k8Yz+vBlSuKkabG8QMJqtCXTGBKzHe1eJPA18F/D5E6Ovpjp3 VBpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709121783; x=1709726583; 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=mr8xNnhDGY0/lMKUx04e9LXvXJNCxTVqWEKyAEz4psM=; b=s3zpBGPLBtoRGVuvklJrMxEPhHfHpP2aM/OztfndruK9jp8m1wzgU2/K9KKLLasu7B 4EWXER+WUTUPV/buXfLc1LHKSoFNHjPqtdj0wiHg3UVu7yC3DyVamW+pKELe6kBjjGOn ojy3qU2Rrebxe1reMeWrDZ1gXmy3p67GSRpDrMOcwtOK8AAHJ7xpvd/LNE7QYE4cSf6q nczPCBsRvXZdtETHiIDPgcm1XulAh+drokiV8XOcwgUd5QlLwT9AtYouxkVQw4Ix2WG9 Z4vqH3RyLSANiQ4GooilwqRx/KAnIZXdj4SBfGztIDj0djEwJgAJzWjFztOlMYgktCVX oETg== X-Gm-Message-State: AOJu0YzzcVqQHMzfr5hO8U3uA0LSJH8rkJjWCF2CADeAwuvGWwukly7Y 7WTZjvdyO8SjQ2gK16tjlp56MVXIGloeObwbdLQc9MVWSD8UoWOJCat+b6phX6E= X-Received: by 2002:a19:5e19:0:b0:512:b27c:18b5 with SMTP id s25-20020a195e19000000b00512b27c18b5mr8018445lfb.30.1709121783438; Wed, 28 Feb 2024 04:03:03 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id m21-20020a05600c4f5500b00412b0ef22basm1918683wmq.10.2024.02.28.04.02.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 04:02:59 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B2E465F920; Wed, 28 Feb 2024 11:57:03 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , Richard Henderson , Laurent Vivier Subject: [PULL 18/29] linux-user: ensure nios2 processes queued work Date: Wed, 28 Feb 2024 11:56:50 +0000 Message-Id: <20240228115701.1416107-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240228115701.1416107-1-alex.bennee@linaro.org> References: <20240228115701.1416107-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x130.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. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240227144335.1196131-19-alex.bennee@linaro.org> 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: