From patchwork Sat Jan 25 16:05:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859784 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1319690wrq; Sat, 25 Jan 2025 08:07:54 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWzHtNVJmTipvoGg7woVR4L7TLbbzdYGpEqWAf/DGl0Kc3vmLmmgq7FJRpqa70hu8iBgS896A==@linaro.org X-Google-Smtp-Source: AGHT+IEDmp9Ev4wGwpMiOPakWSY5WaWChi49L/PtC94zowTBa0WVv0hJFl4JCZNAjQmt6pINnh36 X-Received: by 2002:a05:6214:4101:b0:6d8:f7eb:199c with SMTP id 6a1803df08f44-6e205efcbd8mr113935636d6.9.1737821274185; Sat, 25 Jan 2025 08:07:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821274; cv=none; d=google.com; s=arc-20240605; b=FtmU3UOeatskQQTm12V46ldVzvnzlxslQG0BjzTOPh8VZE5TSwKdpEoztZQqXP3Jux +TrBHrkyLFC4Kpn8BW+eCOML7nrWwPZnFEBzpDJOIKOZ+DTeqblp5hxshAPc0kBjzE9K 2cJoryeuDTMc4Z2Em/NpRhfrCDWQA0mk5DdCJHkks1/hTq/EuBKsw+xHBHGP/ZSSIVCA kVVCVXjJtN2EbIDI5DNLSZr7iZxWaTuU3wNozOztWKUeMJ6+0u6T/hBfBIG+b9X0ukrD kYOnYw6ED5669qbsIwtn291Fdd3tPfS/vghSLYD2XP1kyvLyovcMOSvh7y3G1lckNYIY ao1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=pJfpeIGSlIY2S2DSWTPOeODntCTV2idscj4/VsOkESE=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=OOOUDm67spEcT/t7U60hZP02CG858H13wSU8Iv6iHzJq/iC9a2xHLBDpkVmX74DAOo srX0Jp6TekYMdZ37qeapQB7EVdTSdo7dk3hVyd+48pTVAGrzrOQmmqGc1fUEvLIkKIag ydHmzNpFA8BBMEerdvNoHWomwS/9906WRq/f1BwoJIfiFsZ/ZZU/B0oVZEJTEyWjYwiH sg9cEQTBC0YQuV0UWPBot+/pi4sqM2RYUTpU3f3OKdPoYuGOcpWq+88qVUrVLVZb1VIh 6Jwz59/lC31J1WJrx/+kpq5Rqv3KUM+DIFbee+nHC6mNVTXo+BWKpC11F+zEzvXuRM+Y ri3A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m5g5vPUv; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e205f02596si52898016d6.321.2025.01.25.08.07.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:07:54 -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=m5g5vPUv; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbiff-0004Ey-GC; Sat, 25 Jan 2025 11:06:07 -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 1tbifc-0004EH-Hq for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:04 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbifa-0000Xm-1h for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:04 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4362bae4d7dso21563615e9.1 for ; Sat, 25 Jan 2025 08:06:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821160; x=1738425960; 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=pJfpeIGSlIY2S2DSWTPOeODntCTV2idscj4/VsOkESE=; b=m5g5vPUvVTU28PO/rNOWnQpYVJ7Q9IWKRaYO280B1Bxu3bImx2uUUF/R6FNc1lfR6y cPb0o7nIA2CObw3GmDKuG5xXemI7aKQVn/2c5IQASlPNbz/1K9v9rfkn6jP//HlzJXsE Q38iuDjQOV2H8MTNkwv0Y98GBtcALa+X92QybBvjESMvKh6dfo/IzGntDz/R70B/eScw g0ggOQ1Owq6F+OvqgN2R22pPiVkI/gnIrWtmHAWctStH/wYEdlqYIozRgtc4PLHAGvIN O/LJaJ9hJ7OZsUkPm0M8eFM2sWzrddhX9wUctvMrmKXsuMcJTufl/BlnnGSQQjX0eyeo HJBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821160; x=1738425960; 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=pJfpeIGSlIY2S2DSWTPOeODntCTV2idscj4/VsOkESE=; b=dVVXjWbqBMUCZdqvI5bquXsMDsPLFI60Ufv296NzoC0tjPDyXswSnmDypYLL+mm6zA Nng4tK1qDGu8xRYCACwpsRWTULy2UJrL2+0GDYczkoEHtbuQQOS8nV46M1DkjNgQ5DF+ +n5+6ztx/D7Aa/RkYvq8X6gzqtapYXn6fLfDSo5CifXNPGo1qditDELLByKHmgo3w3tf OXFBFjkGmVlppHgqoheecqUiJlGDDY/fGwLEqC5cbm93JfZ7PkvGvTKpcnm/Ver6In06 ipdssUoNRLdsT3VLIsdoEspKhu0V3pMFNW8Sq9NpFH9ripj62RAe3V+PBAr2SzW8nSze j6Dg== X-Gm-Message-State: AOJu0YwC3HUy+0ivqswMeP+RswHonQrTwGOWu4ewG0fHLjhm1BE6mj0Q 4zhfZt0TFpDjeZ7L2fDjLC15pXcub6bp1NwJO1kfmoDKO+m/t25bdCRkX4hhwz20ozEIlNzAWr/ 41X8= X-Gm-Gg: ASbGncug6CT1y/mVdb/FrCka5ukUW3ymoBZE+rp5Z/pkdexn8DY9Z1KjJ5wjKkiIvMM qIPd0UOlS7zxhWNcadoS21BWgNgthaBZD0V9u8OIC+z0gjECyjrl023i0z9QjDLroNJe0Bx05rI +AJVKsjqpHZOAaFUoYTcu6YfJuSBE5GPVP6HBRP3/dAO753zNT0tTv0dce5FwEWSLVyVtLjmrjr 1J8x9NY0PwuAig9tJ7qdjG5Gj8J+Y2I1LU8iRoEwmoTk/YmAzmFmWmsUdc1BgOPlB2ZFTkdx5Yc +dA7fX3U8ZMQ4OSvGBXzI3Ca2+x0nH2wD6YH79vRL+EOZvWuCXwsiVo8YRocWwVVs3UIsPE= X-Received: by 2002:a05:600c:4f42:b0:434:fa55:eb56 with SMTP id 5b1f17b1804b1-438913cf805mr337515805e9.7.1737821160078; Sat, 25 Jan 2025 08:06:00 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c2a1c3c8csm6008399f8f.90.2025.01.25.08.05.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:05:59 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 01/24] cpus: Restrict cpu_has_work() to system emulation Date: Sat, 25 Jan 2025 17:05:29 +0100 Message-ID: <20250125160552.20546-2-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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 This method is not used on user emulation, because there is always work to do there. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/hw/core/cpu.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 2402706c7d9..e094d54949d 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -748,6 +748,20 @@ int cpu_asidx_from_attrs(CPUState *cpu, MemTxAttrs attrs); */ bool cpu_virtio_is_big_endian(CPUState *cpu); +/** + * cpu_has_work: + * @cpu: The vCPU to check. + * + * Checks whether the CPU has work to do. + * + * Returns: %true if the CPU has work, %false otherwise. + */ +static inline bool cpu_has_work(CPUState *cpu) +{ + g_assert(cpu->cc->has_work); + return cpu->cc->has_work(cpu); +} + #endif /* CONFIG_USER_ONLY */ /** @@ -814,20 +828,6 @@ CPUState *cpu_create(const char *typename); */ const char *parse_cpu_option(const char *cpu_option); -/** - * cpu_has_work: - * @cpu: The vCPU to check. - * - * Checks whether the CPU has work to do. - * - * Returns: %true if the CPU has work, %false otherwise. - */ -static inline bool cpu_has_work(CPUState *cpu) -{ - g_assert(cpu->cc->has_work); - return cpu->cc->has_work(cpu); -} - /** * qemu_cpu_is_self: * @cpu: The vCPU to check against. From patchwork Sat Jan 25 16:05:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859781 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1319108wrq; Sat, 25 Jan 2025 08:06:48 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXBPmJZVl4sXSnxdyrvc1LMKVae3rPyG6yP2dQIOmtNASLvdSY1AzNri7jqUKuZP/jEV1T8bQ==@linaro.org X-Google-Smtp-Source: AGHT+IHQsnMoka7OIIWwEUBj56dUO30I56w4roEJHw8bCbEYKYmXKqk1gK6xjx9qgEEA7fTse7Du X-Received: by 2002:a05:620a:2485:b0:7b6:de8e:da27 with SMTP id af79cd13be357-7be6325fac8mr5511820185a.44.1737821207941; Sat, 25 Jan 2025 08:06:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821207; cv=none; d=google.com; s=arc-20240605; b=e/snhGoJxCWfMvRhzkx+oQfNx++3q5jrnb+5pKPPWPR4qMzcWp0GpCvyI3+fuq/2DP X1J7v8Lh/7B5ZiufhXF/HWwPNwDlJuPEUvbCwtbZYSIRVYn7Ma3XoB15bjzXn2xifI1u 2nnm36sLjfGTio1xoes/NM3tMKVwGZooA9H6pxiY3qLaTp53/ifyXGcUKTLSweAydFyW VPDPA6rAe9XTQWzWNSAnMW220yFLrk1tS8OTDyMLBfJ5ZmE0Fkxo8rEZUnIHTq15R+Yx eNw0JihNyztU0PsnBQret4SkA+RfKAwH7r/+Ej0762nQGF2P0D2dpxhl/H3LzvOfSDm3 njZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=LnxgPJtNl18qpQlYyJcdV2Lpgdr/I3RQhGnRLNDQ94c=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=Gs7Kdc3RvwJmZ4mlaZzDxkYfltQXfFsjw87CBmihzXngr0Ji6EufT9tQXNqOMl63Ki mTvJ9jZxzOFQhZu2CeCsF5Vs/fkbg3Uefab+mdkK88gGfwxxBHXuYmvo4jZWIVIW4ZyO sY11GAkpjqcBh67xXHW5FPuJynicvBB14bhTXbNom80WjnT+93gmRzZknwIQZ8fsLmd0 lsDsZ2JJ6Pjs4tTfJFnAAwiBsMXrdFEwM6AK05IjNKQyr2zFyRrxZo3UsRqqz1bc2GoE CCfKa38oAAMJi4zKIjeIkBfhf43YAIi23k1wXqwcBGEP75t1b+OLfzAcz0/0Cus1XQ54 CxKQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L+ynEg59; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7be9aee1120si588093385a.201.2025.01.25.08.06.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:06:47 -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=L+ynEg59; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbifi-0004G5-Kr; Sat, 25 Jan 2025 11:06:10 -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 1tbifg-0004FV-K1 for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:08 -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 1tbife-0000ZF-MV for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:08 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-43625c4a50dso19813095e9.0 for ; Sat, 25 Jan 2025 08:06:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821165; x=1738425965; 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=LnxgPJtNl18qpQlYyJcdV2Lpgdr/I3RQhGnRLNDQ94c=; b=L+ynEg59YTATX2djMwimpEAgxBPjEmIWqOBEnQyCEGf5EVnQRXxcmUyI8jl0EES8mn g18FKF6Pe0f6BaBGM8VW+30ZuNYun+79Urcbf/I0mvIn3DOL8GQicTUSXQS55F09lell NXmmjuouCqoqDx+bXkxHP3gC9ptfNQQoPXMVS7OjlMPMtrh2fLkoHy1i6H2SkHjFxJSE s+ePEKJa5Zxcq3jU1+J+TibUiKOUqUBugpBdw4KrEFpw/wefn5Wb5pn8jImk54UbMAQR 9cJ6nNqu6vVFanr5ADNHJ7eSXWNGq5jW6oxFZmM+sIt0+dlQ625kwawybvBjrxeUr4+S 0keA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821165; x=1738425965; 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=LnxgPJtNl18qpQlYyJcdV2Lpgdr/I3RQhGnRLNDQ94c=; b=hKDAth9BrEj7mNPy9nI1m2tSi88J74DtW7026VrmKoUoR8FOitEB3lZk9N7JYzextO iIm56pC2qu2XlkTwzvNzS3Oa7MAApPhbKI/A8zvxHKS9cJJZmGdmefgxfVzMMYeEljjZ lI2NB68njmqTAojLAfvvITqEkaCFKzi6amJCnNnaODMNUGOLJaxTbH/+k9c5PPIbPDka 3ptF3tplKuxhJBOiPJtpn3qg0XlIORq8g0rEAkWthUS3L6Gx1fiep1QeJLpzNJROwYOd +eHlgnlMPezVQDEKCxv628swl6KzVz94V1TlENPtmqQinlZIT+RCIy1JNLZ7LVP2gdzx 8eDw== X-Gm-Message-State: AOJu0Yz4VAwobDxd6keZzNoGF8yFnOU5oPdTjvKEFigYUV9IeWSwL45/ QFmReg4rNn0iq02MMXYwmArPYTNuZulyWKv5VHrpJKdlvZy1mOoHnlXeolkKbdoM5ZmLIOel1Ln OZc8= X-Gm-Gg: ASbGncukV2U9YCl6eP2wW8ORWAygSxNc0ZPeYr87imHjSOGm5j9Qg/mzKN2wjpEKy60 c/OCg/1VnaogUojAv3MxMf1Bq0h2D1/V2vunbR+Hzwppk+0uUhYDqsR7B+b6dj1x2d6eoAC1sKE xKXnXmsrQMjVBjyqNM9bszGlGZuvQb1Z+wUBN3MdfgBNYv3RqBS4FTtsVc1f77apyIHXQaJiXq6 InkP+nf8ETsuH8Gs/Wm+Mn3LK/I8wnosclcYvW+awN+sV2t24ifZcUZ2E+setcT4hO+FhzJumMy wNDRpppRkZ2164qrKCGKUC08rMRs0F7hXWaRvSfPSiIxCG5P1aFysiVNd/8S X-Received: by 2002:a5d:620f:0:b0:38b:d765:7027 with SMTP id ffacd0b85a97d-38bf57a2675mr24349477f8f.41.1737821164688; Sat, 25 Jan 2025 08:06:04 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c2a17d7bfsm5942195f8f.35.2025.01.25.08.06.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:06:04 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 02/24] cpus: Un-inline cpu_has_work() Date: Sat, 25 Jan 2025 17:05:30 +0100 Message-ID: <20250125160552.20546-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@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=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 In order to expand cpu_has_work(), un-inline it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/hw/core/cpu.h | 6 +----- hw/core/cpu-system.c | 6 ++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index e094d54949d..d64c823e768 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -756,11 +756,7 @@ bool cpu_virtio_is_big_endian(CPUState *cpu); * * Returns: %true if the CPU has work, %false otherwise. */ -static inline bool cpu_has_work(CPUState *cpu) -{ - g_assert(cpu->cc->has_work); - return cpu->cc->has_work(cpu); -} +bool cpu_has_work(CPUState *cpu); #endif /* CONFIG_USER_ONLY */ diff --git a/hw/core/cpu-system.c b/hw/core/cpu-system.c index 37d54d04bf8..16d5efee12d 100644 --- a/hw/core/cpu-system.c +++ b/hw/core/cpu-system.c @@ -23,6 +23,12 @@ #include "exec/tswap.h" #include "hw/core/sysemu-cpu-ops.h" +bool cpu_has_work(CPUState *cpu) +{ + g_assert(cpu->cc->has_work); + return cpu->cc->has_work(cpu); +} + bool cpu_paging_enabled(const CPUState *cpu) { if (cpu->cc->sysemu_ops->get_paging_enabled) { From patchwork Sat Jan 25 16:05:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859788 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1320079wrq; Sat, 25 Jan 2025 08:08:49 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXxuxbDo1XQMFMNoamxe8bk+gh+0rQCWQJs5kUVb4V7yDsSKua0nk8Eo5Kp+qq6VbYUkQr4cw==@linaro.org X-Google-Smtp-Source: AGHT+IF09FFwmr5LNY4yBHderwxh2UGWKBV7LV5Nnlbt6ixBg2xmZM5QlCpN9JcrgDSFjx9UBei8 X-Received: by 2002:a05:622a:4cb:b0:46c:8380:43a3 with SMTP id d75a77b69052e-46e12b9736fmr512434141cf.45.1737821328848; Sat, 25 Jan 2025 08:08:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821328; cv=none; d=google.com; s=arc-20240605; b=aZSuSrll+xKEDiOYLKV2np+m3IypCTztM0N4IuUFUM6Fxa0yg4zD/6bYbBVOMbwUkl 46yXKuZcJG4sqkaeW8EXUvLLN/3bmO41aIq2lggBbxzflYhGKZwISo7LLDjfmAyJtQAF tOqJOqphRCxKnCSUxEWPhzpc9Ds8gVNSECQNKY2BgxwTpZJy6/QKRa1I4grwMwsWQ2Uq QV1RRfhzFwU0xBxNoPhZUEIc0MC1luIFikmQk/jZymChINCUMoGhpYiU40XYLV4g2vVt BIvsotck4LYEVHaekDOrTocu3YMJnfwS9BAGyaPtZ8n3S4milHw8max7Rnghl+59WtKW Myig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=1YoTq/Kw8BFNJbd5udCtM6rehNhaZvqVSckhQj9fm84=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=XvBvBfP8wXh5nr5o4vVYyo0WFJMnIY6NtCBCvaC4vMDQpT84Kv2DtZ/Dp5XNcRW7QD dYAo0OI/0bq60N1gB4NZi8XzyZmWervJPYTCIxo6TQuNNE6l8EHXFexJJGL5oNav7UYG ISipEFZd3wiKJjkwRXt2XwQaFkrvNAljyQV0ffwX6kbzjOL/z4Df3vi6P+T7TCjjnaUz 4lCtAqLviHRR5w0KYGwOC2Kl0PVxnBypsWKXzmWiYnCqqhzWl1TPbWoGowgKFRv2RAcS WtV/gtCpZhdoRS0HANGTYz/7kigtVdzJNpyK0IRdQM2a0wnvwUEhkf8eGZkcNrI+h52T s43g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wMDHUySx; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46e66b865f8si50452541cf.382.2025.01.25.08.08.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:08:48 -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=wMDHUySx; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbifo-0004IQ-UV; Sat, 25 Jan 2025 11:06:16 -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 1tbifm-0004I7-F4 for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:14 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbifk-0000c1-SW for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:14 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4361b0ec57aso32235675e9.0 for ; Sat, 25 Jan 2025 08:06:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821170; x=1738425970; 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=1YoTq/Kw8BFNJbd5udCtM6rehNhaZvqVSckhQj9fm84=; b=wMDHUySxNc/jdwJQSdsfaazG08wfO4dBlH28e33m/Q24uh2ySJGVL/Es3a8/zxfHl+ sOYAtY70BgYCz8vcozlI7KUpnnds7LKaYEqbiC02ljK0lil80ugJpcIdqT5ptdvUmWvU VQNhntcKi/J2yNIvEYLvUOzEIx1ovMp+9Ct8N9FANJjgGXtquv/yb9DZUURNa1T/sHVp A3URdZbAE3tqYMBkc0RT9ZNrI1zvBUp/Xnq5sLn5KUTGa3ePDkQYzy5qdBMJGXnNosve K7F98VDqIW+K3OYYXJqmrMpdMttN/o3Za/1dgefoKDcOdgXJXDnsOJlww+iVAbQCNjds yAiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821170; x=1738425970; 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=1YoTq/Kw8BFNJbd5udCtM6rehNhaZvqVSckhQj9fm84=; b=Rpeu9mkxxcED5jGQaKCY1GT39neITJANujSKy4yI6BkBst+FVFLkSZ0qdaON+yzQmH +nrR3smrLauqDla26LvL9UQlB843goeQhDddjEeRGh7oSbWIO0+5PdvGZFCizjzz8ywP ZW8Z1ZfVJ7Wz66Q77wdN3wJbpzP0QP4b76AOqo8J12RD8+uRjsfvPNap3z+v8Y5ThWnq NIA8jsX+YYkdbaH7qFZWDlL1pKfoTA7SMaIEjgQaiET9l5jeT2PCkAEL1XdZDsz8+O6w SuYuZrMsjeC9QibSuMc5WSAVdfy76rV0opIxOXa3stjKxU1StVH/o2PuJq/ppJdv8NXy msiw== X-Gm-Message-State: AOJu0YxcnWpuUg3KqM9hVu+dsMbrGVwGCsp4KAGAOJeKBFtYh9QCzGap dIcfKcRpSWBJeguLNpojrRaZr0mTOIsKykwYQZdutZcC6MOhY0ulz3HZoWgZY2scDFEpK7KVNep EYT4= X-Gm-Gg: ASbGnctshzzWMakCGWEnlLLIkxRizZmLPBZ8nutWvIzBZspx3QQFiAa3VsD+vIEvgVH kdLmJbqe9eSTGidFDgKxscRS/MdHPgUAbWgjb05UUTfOz96EUmuvmSzo5skxzKL7Z9U9vYGts62 NZDLubseSfdBae+nPasxZExShzos5IWHT4y25bbfT0GGwZmatm10hXxF0KlBNFtObhrWddB6/rE XM+q73z+saxDBAv87CpTcPGchDTKkpqPTTIbfS4DhYtqoH4N45Ji6aloiXAuv9fJU140ONtLxyN 1iEHF083ic2VtIaLxqV3LzGiwnOQitI6+f0RSaSE9s+AAvByD7wn07mqXPGd X-Received: by 2002:a05:600c:3acd:b0:438:c18c:5ad8 with SMTP id 5b1f17b1804b1-438c18c5b00mr44668995e9.31.1737821170008; Sat, 25 Jan 2025 08:06:10 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd54c0ecsm66090525e9.30.2025.01.25.08.06.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:06:08 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 03/24] cpus: Introduce SysemuCPUOps::has_work() handler Date: Sat, 25 Jan 2025 17:05:31 +0100 Message-ID: <20250125160552.20546-4-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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 SysemuCPUOps::has_work() is similar to CPUClass::has_work(), but only exposed on system emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/hw/core/sysemu-cpu-ops.h | 4 ++++ include/hw/core/tcg-cpu-ops.h | 2 +- hw/core/cpu-system.c | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/hw/core/sysemu-cpu-ops.h b/include/hw/core/sysemu-cpu-ops.h index 0df5b058f50..dee8a62ca98 100644 --- a/include/hw/core/sysemu-cpu-ops.h +++ b/include/hw/core/sysemu-cpu-ops.h @@ -16,6 +16,10 @@ * struct SysemuCPUOps: System operations specific to a CPU class */ typedef struct SysemuCPUOps { + /** + * @has_work: Callback for checking if there is work to do. + */ + bool (*has_work)(CPUState *cpu); /** * @get_memory_mapping: Callback for obtaining the memory mappings. */ diff --git a/include/hw/core/tcg-cpu-ops.h b/include/hw/core/tcg-cpu-ops.h index 2e3f1690f12..f60e5303f21 100644 --- a/include/hw/core/tcg-cpu-ops.h +++ b/include/hw/core/tcg-cpu-ops.h @@ -141,7 +141,7 @@ struct TCGCPUOps { * * This method must be provided. If the target does not need to * do anything special for halt, the same function used for its - * CPUClass::has_work method can be used here, as they have the + * SysemuCPUOps::has_work method can be used here, as they have the * same function signature. */ bool (*cpu_exec_halt)(CPUState *cpu); diff --git a/hw/core/cpu-system.c b/hw/core/cpu-system.c index 16d5efee12d..7b16bda2250 100644 --- a/hw/core/cpu-system.c +++ b/hw/core/cpu-system.c @@ -25,6 +25,10 @@ bool cpu_has_work(CPUState *cpu) { + if (cpu->cc->sysemu_ops->has_work) { + return cpu->cc->sysemu_ops->has_work(cpu); + } + g_assert(cpu->cc->has_work); return cpu->cc->has_work(cpu); } From patchwork Sat Jan 25 16:05:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859804 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1322023wrq; Sat, 25 Jan 2025 08:13:47 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW0KKnw5Od8ALhXdg5g5wozaj2Sb5Ly8ZWGvyh0zPY65cSfucgH6mmieZJ7k1ZGHGH4EAse9w==@linaro.org X-Google-Smtp-Source: AGHT+IFD1w+tSMkF8tHcK7awx1HftV96D29uOm/z7rPFbWnX8U686zz/otDpjlNKH8jZSQ7qydgO X-Received: by 2002:a05:6102:f08:b0:4b2:c391:7d16 with SMTP id ada2fe7eead31-4b690ba7dcamr30208067137.7.1737821627416; Sat, 25 Jan 2025 08:13:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821627; cv=none; d=google.com; s=arc-20240605; b=RFEnd5uC1osxngVHxkX7yiEbBayzkDh7Ug5jZ96alE7IMinOuxL31CKptKq7xvxBQi nDmuvvhCAJf80FS+94TY6xbTnBDWza+vJnD7W0DE6XSSlDMApGPW/l8kbEr/xRLZD9ab rihMj4M3TgMbvx3m0swl4IXXeGm4hnnl7qICfqCXbZiQxQN/3pihRPU/7gLLf9rPEzDy gMVv6do19yFxyVzVBnJHfhkg6EEn8a5Vbj3h6X9Lvojfu8XrkMWSsOmXghaIfSM4yNY1 8pfXEKhQh3k1yl2Y4fq8nwmQns3tTve+td7J6KSPjTBlbYaLYvWTqK+30ReylCSSYA9M SYoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=hPivNFM2ePYvU+OXN+1pyPQF43zn33Cj2yHAkQlRhv0=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=D0lI+G82SC/jI7IvWFNamVxN8Yh0WpTsOiNNupEqM0xxWOaMooGFg9w8xlO0zhh5f6 7mRxtyxi09YJ0UqBNHQoNf5I4fpNMpkWJCUVJSpBK0T578hbUY10CpBi6CKcAoPONZEa aU5LAPhl5aHntXdrGdQcSqvN0rLEc9od8UBju+7kA/8OD0lqupxgH9PDipPNpujaQY1d MuEXIDyvT3iQBtd+FprLz7qs4Je8sfCK7sB8bRScZSsN8AJFBL2gh1G93FV+KbKQn4vn gdYM3KWm1as72pbtyd98rsW/eT8Ki4qgUnImg/X2+xnK1aEDZH1XCUB0ktltYhE7We5U x/uw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xq+BWhOC; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4b709753a96si1564017137.37.2025.01.25.08.13.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:13:47 -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=Xq+BWhOC; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbifx-0004LL-Fb; Sat, 25 Jan 2025 11:06:25 -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 1tbifr-0004JH-2z for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:19 -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 1tbifp-0000f8-MG for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:18 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-436a39e4891so20456975e9.1 for ; Sat, 25 Jan 2025 08:06:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821175; x=1738425975; 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=hPivNFM2ePYvU+OXN+1pyPQF43zn33Cj2yHAkQlRhv0=; b=Xq+BWhOCwMZaw1JyL/tFh306SX1UqZZ6z6FArA2Dc4anZtbx+Dt3XIENL0ovS/oBdq tAwdqiQE/kQ3taaktRdNuHUIjpJn0aguvLb4NZ1zhslUi4eXaHt4UbPZqUL6NFcCPg7o PqzbJ6pm+bI9xSPPMCONsMheEcuCYOEp2TdhuDcPkLbxADUnzMw8/tPiF/EtqpIwEiPD DsWnUCSNDp/19UBujNU86yVwA5eEJgwnFa20xg9nvuiIqCDW3afEJtsjpVFsMNaJPTvQ zhcVybG5KvCax54/UVW1KNluEhQ8YPZ++rimX33dZJTvMFkiMfESIWHdzbSWOoaB8YDa v77g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821175; x=1738425975; 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=hPivNFM2ePYvU+OXN+1pyPQF43zn33Cj2yHAkQlRhv0=; b=F7x1nm6zIQ8PMFMjVLyBAA+ag/jQY27ypO6u685PlOE+RSEVK+refC/uOlY2dPEhPx 3bqzdxGv/RXS17ImRbsuBCjV4XbMEouAwE/imYc5/TURDcWPBi43tIHLPT7pyZVclQfC ds+lNXAKUv7B/8sqO/ty2S/S/WN20zT6man7XvaiRddANp6CWzKdaLT4QlQR/3jxazzD SQW12x6D498N32xA8d+54e44q3xzlMdAcXJ0rqOX1DkJM8WAfhQ768ZdQS3duMyLRtNV ETmzB3vAixsFF34EP37is6W2RdloDx5dWGFhahBovSZOZwqJQCabA+Qv3tQeTyPwPt9K sIsg== X-Gm-Message-State: AOJu0YzmpF94Cjb1Y7v1YWsbplwAQ+s6YoJckRJ3SI+7ytAKO3p9dB1O XiAyfHSfaAhItzTvO1z5Ie5qXXe9qw2u5zf2mcO0tFlYQ9arG7tdHwudRQEHRbcrGFv3EXRRexZ TOC4= X-Gm-Gg: ASbGncvAHcZzxmNROvgNWGyjD3WB5PjpqpKql9sNDIFLjgImH7dpfaOXfCmFBFM1QRJ FkYyYw0EkOznAiw0tv/OUbRLFKwyfW7Yq5Fa3dFbtVZhYf20u+XYU0WUnEKas8QZ03QRCxrRVRX bvIWvhpNXg0rsYMeHIDK9XvFJzKMXIbb/j+FRhui8YEz8n9UTrqJs9bO0MF8SoP4PgUi5/qOLJP tIEAPnYq+MhQFQIcB2F10dRYpenBjB1v0xUTUYCsJIdbHFfHGmRu9qaUZ+gN8UZP5NUNwMieawC ZiQmPEmFZT5YyiaA5C5d1kRcblFwYCPYc/+IqSDCIWLow0ut7U41YK8ggRQ/ X-Received: by 2002:a05:600c:a09:b0:435:9ed3:5688 with SMTP id 5b1f17b1804b1-438913f86dcmr329807905e9.18.1737821175312; Sat, 25 Jan 2025 08:06:15 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd4d2a82sm65125815e9.36.2025.01.25.08.06.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:06:14 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 04/24] target/alpha: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 17:05:32 +0100 Message-ID: <20250125160552.20546-5-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@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=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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/alpha/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index e1b898e5755..83164a694d8 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -63,6 +63,7 @@ static void alpha_restore_state_to_opc(CPUState *cs, } } +#ifndef CONFIG_USER_ONLY static bool alpha_cpu_has_work(CPUState *cs) { /* Here we are checking to see if the CPU should wake up from HALT. @@ -77,6 +78,7 @@ static bool alpha_cpu_has_work(CPUState *cs) | CPU_INTERRUPT_SMP | CPU_INTERRUPT_MCHK); } +#endif /* !CONFIG_USER_ONLY */ static int alpha_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -216,6 +218,7 @@ static void alpha_cpu_initfn(Object *obj) #include "hw/core/sysemu-cpu-ops.h" static const struct SysemuCPUOps alpha_sysemu_ops = { + .has_work = alpha_cpu_has_work, .get_phys_page_debug = alpha_cpu_get_phys_page_debug, }; #endif @@ -251,7 +254,6 @@ static void alpha_cpu_class_init(ObjectClass *oc, void *data) &acc->parent_realize); cc->class_by_name = alpha_cpu_class_by_name; - cc->has_work = alpha_cpu_has_work; cc->mmu_index = alpha_cpu_mmu_index; cc->dump_state = alpha_cpu_dump_state; cc->set_pc = alpha_cpu_set_pc; From patchwork Sat Jan 25 16:05:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859797 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1321583wrq; Sat, 25 Jan 2025 08:12:42 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWbX5wl/V7bFL2eFlI2mWIVM2r9m8jOYK93QxqsURvwnVioh6TlAUAOFdz/yZGP5Mvkd3sriw==@linaro.org X-Google-Smtp-Source: AGHT+IG6AFH4lS1QPG5B/BnlBtyXmTMnhlXmxuurmhD7UAVUm35w/KuMvTARWWJoz1P5iKB6gStZ X-Received: by 2002:a05:6102:3e0f:b0:4b2:45a3:59f1 with SMTP id ada2fe7eead31-4b690bd3ec9mr32380235137.9.1737821562015; Sat, 25 Jan 2025 08:12:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821561; cv=none; d=google.com; s=arc-20240605; b=gDv2evFF9KZ6aP1DFxNYrHLagrVQkWTQaeIgloIBNNlmKYY8ESyoO5/yZiai81W4Ir x08BOlxdJyY4lEZc6jHKcBruSEKw4bJqMAuRltccvAEgoaBaXOXOuyMYACZM41hM+lQy jy1vl7TF6BTQhF2IpdfTAEOh+2bCvDYjZqPYkvSn6idZKtNML1NMHfgRH8WmCcNkauxr nGjubnI4pDKzm+HyEDwJrRxunRsEbz/oLru8AK/Q4xCNqGqyx98gzpLRZcdCkXIx/+NY Y8iRWXHM5FqIBCm4IM5pHZcwel62yugfjS5nVxoskmC7fUmDS79+tBMTufnQLSN9t54I 7dRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=hlhipGgHKI5N0qn8K1o15KvLAOg1D9rjFfwCNaRH9Tg=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=SzaNl7Xtm4/Rpg61K9ZScXpsKPFWvBlnFCeDmBVM1/L2tfKgcDXZ//buqCwYgis6Ov fzDqiUALHX6Lm+XhJs5rdQQtp/sxHEILZzIHYsqp7rj4wEzSWt0dpTHdasNRQ/TfJ+uO dUoQOvAaJXAzX+7ySkMpyvZaeFCs1W/CMqu+cbMUdClvldfwE69ABo8hAyQpuFt5Ovp+ urYPGFrdtuaglJHLGVdrkCf6rFYZRgFG9TgDoeH1bmzSNlp1ZDF9h+hDJVpvQwgM6/38 UJp476msY4GTZq0BNcXrPGIvxvkJ2rF4wkDaPVIcCtltuDWlKaGEHkhL3rEEz+8kla5N W4hw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uRMvEuBw; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a1e0cc1a2514c-864a9af0708si1398918241.17.2025.01.25.08.12.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:12:41 -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=uRMvEuBw; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbig7-0004OS-3h; Sat, 25 Jan 2025 11:06:36 -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 1tbifw-0004LN-Cb for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:24 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbifu-0000hG-SK for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:24 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-436326dcb1cso20548555e9.0 for ; Sat, 25 Jan 2025 08:06:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821180; x=1738425980; 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=hlhipGgHKI5N0qn8K1o15KvLAOg1D9rjFfwCNaRH9Tg=; b=uRMvEuBwpKb9qKh5ecteLWRakajXOqgvTH6Ofg17ofOlXKU9yMHa+HKLznQa5ehWaL lZsBybt5EWNShIGObBpiQ7xxMY+ESbejO/EuzUF4jsnf1QP0xiPQ7ltT//nggzCrQttQ klvMDuEmP4moIzIEAxw2ju9fwNKkRxnVwtoX1iJmG1e4qbqsm0KtqyHsni6KykvpCvIv Qn+u9Fmrdh5loMf6TSIpJgL21pJAs4Ymqm4Pot4IioKBgw8W1VrJVi0Fw2orzsg4KthY 5x+OInU96mlceJgmeTRc5/V1xze2PS30XYDoar/AbJTOlUCCFxHYmu6Ud8fPqSkF5aJe BHRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821180; x=1738425980; 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=hlhipGgHKI5N0qn8K1o15KvLAOg1D9rjFfwCNaRH9Tg=; b=tm/46D2B9O1ypCgzPi6aW+0oOmZUEl4l8CzBPW8VTNfbUATe36k+WYl8Lha/LJ5x3i eA+ENUZjHbhKDCmRUHTPQZm5WPx7j30Tu2N9+uouEmdwV9HK/JHM+edhP1NBlEDp1MzS f1agCOt62yVDrY5DmziBeslHlHT3J6oWh4RuADQiR4XxuL0yN4iv+NWSq/L7FcVcRofF CksYK9iJmgKllzRaNqtohiGYXm3Ro5vfJWt/uxxAtDZ61dk7slZ+pFnZ1F3udGLxTrHP B44PsmOpkdh84CSAuLEDnz3OLzaBrYiRA4+TjyIWMJC51ieqEL/22qI6EYy4oQhLEsSM 8hkg== X-Gm-Message-State: AOJu0YxUft+9bpzUQvDUse5pPhE3Qose0JKDRoJ5/uEJY7opBg1MjH73 QD35WEcuiM4ILEPwkB6WuteDNp+/7IMGpamLnpZkMPaF3WAMa0O2YN8jaqXeWHi3bTHLt6l3Mvz mj00= X-Gm-Gg: ASbGncucQZBgTKMmH4AEpayybn6zWxTSEEYq9paWNzyWup7cx2gl7t9eHmBpFpNOCos TqcTeKjFNwpks1u4bQ1+ugD1Bb+WIVRU1ldgc5Ld6/U0t7pBSQReJ7pADnhbuLqmaiQmN4lBfZ/ u+BWMKk4PftpL51PLCQZHNOmoTG6NzIW+RDvJxPSKN4FwjA2l71EVCwiSqPXHaF9g9gZtA/fGKy lYrInc4iVfMtqwCfGC5TD5MayAgX0Q30ZJTIHJgliN+JRNN4jKUViadv6nMEPEbxS8zBDpUjdO0 c4sTLWnvubpKqGN6rhsrRiXXwVmTOP6zR6SEdizqL+WsDI2GRQi2XG0d7iVZ X-Received: by 2002:a05:600c:5486:b0:436:51bb:7a52 with SMTP id 5b1f17b1804b1-438913c9c93mr329979235e9.7.1737821180586; Sat, 25 Jan 2025 08:06:20 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd4fa479sm66599865e9.5.2025.01.25.08.06.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:06:19 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 05/24] target/arm: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 17:05:33 +0100 Message-ID: <20250125160552.20546-6-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/arm/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 048b825a006..322c95038d5 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -123,6 +123,7 @@ void arm_restore_state_to_opc(CPUState *cs, } #endif /* CONFIG_TCG */ +#ifndef CONFIG_USER_ONLY /* * With SCTLR_ELx.NMI == 0, IRQ with Superpriority is masked identically with * IRQ without Superpriority. Moreover, if the GIC is configured so that @@ -141,6 +142,7 @@ static bool arm_cpu_has_work(CPUState *cs) | CPU_INTERRUPT_VFIQ | CPU_INTERRUPT_VIRQ | CPU_INTERRUPT_VSERR | CPU_INTERRUPT_EXITTB); } +#endif /* !CONFIG_USER_ONLY */ static int arm_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -2671,6 +2673,7 @@ static const gchar *arm_gdb_arch_name(CPUState *cs) #include "hw/core/sysemu-cpu-ops.h" static const struct SysemuCPUOps arm_sysemu_ops = { + .has_work = arm_cpu_has_work, .get_phys_page_attrs_debug = arm_cpu_get_phys_page_attrs_debug, .asidx_from_attrs = arm_asidx_from_attrs, .write_elf32_note = arm_cpu_write_elf32_note, @@ -2721,7 +2724,6 @@ static void arm_cpu_class_init(ObjectClass *oc, void *data) &acc->parent_phases); cc->class_by_name = arm_cpu_class_by_name; - cc->has_work = arm_cpu_has_work; cc->mmu_index = arm_cpu_mmu_index; cc->dump_state = arm_cpu_dump_state; cc->set_pc = arm_cpu_set_pc; From patchwork Sat Jan 25 16:05:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859783 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1319564wrq; Sat, 25 Jan 2025 08:07:39 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWWev2PVNqXlaSYG5TWFZ+dkyDNm8XS9OqIpNM3uTL/LsZSOWzS7KQWjXTDPQIcuCgHG3z5Fw==@linaro.org X-Google-Smtp-Source: AGHT+IGCWag9zHtlg5cZHy3o9viKQFLvJJ5qJteasESm5XJby9uF/Qe8qX2gx6SpRldwwqDVADVI X-Received: by 2002:a05:622a:20d:b0:467:5910:255f with SMTP id d75a77b69052e-46e12b75c5cmr551590011cf.30.1737821258986; Sat, 25 Jan 2025 08:07:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821258; cv=none; d=google.com; s=arc-20240605; b=jtBXMvZ0fqoJHFMxUl99YNOninuBBwtf+8ySPAmKJTFRxsrqp1aQo8Z77vaKd8sJgo Yni2MzlIJsp+Wgu3E9dqDmrbhYySsgfPqrmny9JD8kQq/Q+O4oMxgH+pjudehiyi0gFB OrxMlU+yjzWxWBYWxbOyCb4soqQwj8d4X7yo2u6NurpAWIsGf637KJx/JmoSxOUsyKom 8mK/xVbLVLnu0F4xEKLFQ4DZjztot5DkZ1Q6V7HJnLXsGa3xy/G9Lj1aAU/TccOG1m+5 jYq61HzatLaHdZiJUBGhQ6i6n2D/4aYTLXLKV/zjqmO4j9nIUZS5NRJBatTLZPxWiKmt y0oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=7GbKJhiOZPCKm4Y+qVPyi/qaA7c9EbLbN3OgEPNHS5s=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=UQlszqQk4BDdl3kAcU4wvvLF55S2QO0KwBg9WfW8KdjwuVqJfFqcxZwyu67qJBuSqb Q9778pIRVbLKHFtjmLGS4PLOMHjJPy2k63mwFjF3JvVPMuOz+HoEg8tGtrwVO7ZDJUS/ AYAGwejIWO0s7L+LtDK1AXNspisV1SBssy5HRHP7UmZTrjlnOKFLCwsdieopYkpt096h lmquop7nXI38gNj2gZla2CrfbJDmxEqrWunjxMTCj215qw91sZV1WQORYNU74v8B4Lxl C3ETSc5dsK/mclJajAshpo+FIc49eBZa4/w0vcbo12ECljQzfHXgpvQKRMI84id9lqKw FqaQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CeHlvQOy; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4b709a2af0dsi1319510137.660.2025.01.25.08.07.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:07:38 -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=CeHlvQOy; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbigD-0004RP-R3; Sat, 25 Jan 2025 11:06:41 -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 1tbig2-0004Nx-Jd for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:31 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbig1-0000j8-1L for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:30 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4361f65ca01so32098545e9.1 for ; Sat, 25 Jan 2025 08:06:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821186; x=1738425986; 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=7GbKJhiOZPCKm4Y+qVPyi/qaA7c9EbLbN3OgEPNHS5s=; b=CeHlvQOyl+3+ThFv2AqMEw1mSUY6S33lbTQH0y2CMHJ82OfImqqM41ymOOiLyFIsXf LFqEOJhffLEtWPiFeDs+aMDvUyBNSPd4mXISnt46lG/96pQmexCoVtXBR99+czv6YJ4F 8yTxML1fc0+ZRKm6YYS0NRUWix5nyfNwWsoP/+BKhID7mb9BhoJRWdpHSvsm6tcGANeA CY5GOEGwrCBPkPaAhiG8gtAqXPRBq7/a354C9bNSaYiEobUgtAam7N2o59KCUrrDRdy6 geeYYJWS5vm3rUgeFOHtBksEuzWaZhzPUiwZqxgzoXfhtx0gYn/r4PSa9zmx0rkNaG/o mmew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821186; x=1738425986; 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=7GbKJhiOZPCKm4Y+qVPyi/qaA7c9EbLbN3OgEPNHS5s=; b=AuGO5gLEvgE+coRimCyoYo2kBEvSMTOy6RTOs8UkbADCdQxRMYTh4//u2nIz1JQjtO +4tADs3QMhbmPlpXbPfqQ3GfcA4ceQSzfTGY7a1ANftLy5dn6dPAFBD7L29JWzQ31QvJ DO8T6uShkxtxXFY0Tng5CDMVVtwwWcdEimTx39dvoSd7sUJdQWijXUwYRHUZJj7h4CFe YrnZAcZGAqdAWtMct2jDdc9oKGodbu1AEG5xx0v5UmHsn3L7swSDqgvpLSTRFghOpkSO MncNMeDqVSLv1+EcXbwFc09IgjZuK8+cLjqvgAquuVTgjc3Sh/ORzuipjdHnA6tjBHiy e3nA== X-Gm-Message-State: AOJu0YwSA6qbhIrlXpLVgLZJq2DWtZzm4RN2PHrGHkZYPDMwoMYaRI37 Vw/OeOP+4cA78MuizKvwLNlGxAJ/i8ZVD1wFg1XK3N8D4iQCRkO/SPMcZ3wnlWMoCYBjwCRAikk CjaM= X-Gm-Gg: ASbGncu/z28zX/ypsZ3TVc6Wgb/LgqwZQj3spOg6BjrFRsG3Z8dc/jjrYK1QaCHjCxp 1p4FzSFS+FYT2nXYalqjH0+GK1lqptqrHuszasxjEtjERBol0KATKi4PXEYoOMN+UsalnHc5jyv Hz0vYhnlNE5X0pV03IfdSBUBJLcYtBe3BrOz43eaLtc/80JqtdNGriOWWHb2icIets9gKU8BvuE hLlM8YaxhqQ3CNbpo3akv/qLXAynLEQClTR1MQBOyvMnAQcev+RlLItf3w7H8Wc3rgTwchf7CK0 huxE3+eejpd1Zka3B7HQxladIDIqV7SnUuOqp/RcJU2kxhHtY3iNRrt6AWi667vcN9OdFzM= X-Received: by 2002:a05:600c:3544:b0:434:a781:f5e2 with SMTP id 5b1f17b1804b1-438913cabedmr292044925e9.8.1737821185793; Sat, 25 Jan 2025 08:06:25 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd4b99dfsm66040915e9.26.2025.01.25.08.06.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:06:24 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 06/24] target/avr: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 17:05:34 +0100 Message-ID: <20250125160552.20546-7-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/avr/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/avr/cpu.c b/target/avr/cpu.c index 8a126ff3222..8712813f3e2 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -200,6 +200,7 @@ static void avr_cpu_dump_state(CPUState *cs, FILE *f, int flags) #include "hw/core/sysemu-cpu-ops.h" static const struct SysemuCPUOps avr_sysemu_ops = { + .has_work = avr_cpu_has_work, .get_phys_page_debug = avr_cpu_get_phys_page_debug, }; @@ -232,7 +233,6 @@ static void avr_cpu_class_init(ObjectClass *oc, void *data) cc->class_by_name = avr_cpu_class_by_name; - cc->has_work = avr_cpu_has_work; cc->mmu_index = avr_cpu_mmu_index; cc->dump_state = avr_cpu_dump_state; cc->set_pc = avr_cpu_set_pc; From patchwork Sat Jan 25 16:05:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859789 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1320511wrq; Sat, 25 Jan 2025 08:09:57 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUuaAdhQh6+1qLlQX+FuHwcj6Z1cmQNrzOyBd0aHPrnvXUkQO/fs7jH88UDJbhU2ehYQeWTBA==@linaro.org X-Google-Smtp-Source: AGHT+IHMc5DgNv3Gy0Hsddc1qT0Q4ptbLb1wuuEoGtsPKVGDwR17Qh+O3nWchgcXL+l1qHzl3nU2 X-Received: by 2002:ad4:5764:0:b0:6d8:8a0b:db25 with SMTP id 6a1803df08f44-6e1f9feaca8mr194267666d6.21.1737821397208; Sat, 25 Jan 2025 08:09:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821397; cv=none; d=google.com; s=arc-20240605; b=MPW427r6AzccMuiw5x07ZjChrqHQXzBn1m9dtiSRphqmBw/Wg962WsoMrsYUxE91q5 3mVm15EwBWMQnuIqynLv4MYTT9wUvon7bvRerSHz8f+cP51rmQai/w5rXdAiHg5PzG/d uCE4QnulvC2g1Ea7HduDtE4h4jr4tMmOVtq7JtitSewcaFY03dfxa0EzF5Vhp5U+f5y6 mS9++hvch7y6YpWD/vVf7fbxIgMSDFOKv0Ch6VCxJbeIUHC3cR6UQXUMCmRH4ahXaMKO aQP2kxNJNdyadRy6gmYUbs0MmHqcI4OGem3R3UuikjdufngN/cTQhCijvvXQbEXvw7hf ZFEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=OeHo9c/VM1KSl2EsYkHb7Xalf2iVdr+8YiL4SXj3SsQ=; fh=I6fFmTgrhLU1uS4M0ia+JqCZBc01y6g0l50UDnq61Sk=; b=gtPV95Q66vJmpROH4IfX5BjH8DnhUA/zup1wQY/OR8RrvfQKOdOsPfSMbpVI+FTrjc hyJJRUyvJZyZRicDul/GChWXlUlK+R3vfmuLr/kZXbzglw8fFq34ar6+w6qpdPJgHHeF wq1Tt4KvsuZNeSP422IG531hhFH5NmulnlD31o9/1D9m0z3/BVONalyAK3sChI97VUH1 aVaBE1X5z6LcAOqrUW7WncLaNTNBT5faUzDq9VMTQzgMA068dY47iVNLXsPcwZTssitk oU8YAwzREig+UT2uvf43yZ/taAcsmjlXcBIpkbVIUJsO60eaG8gB0lheA+lco7CnJWfB +npw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d5mAn1bK; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46e6688879csi49523211cf.144.2025.01.25.08.09.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:09:57 -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=d5mAn1bK; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbigD-0004RN-H7; Sat, 25 Jan 2025 11:06:41 -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 1tbig6-0004PC-On for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:35 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbig5-0000jg-5e for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:34 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-385ddcfc97bso2715271f8f.1 for ; Sat, 25 Jan 2025 08:06:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821190; x=1738425990; 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=OeHo9c/VM1KSl2EsYkHb7Xalf2iVdr+8YiL4SXj3SsQ=; b=d5mAn1bKVEbkwp4kPu97gdgc74BRWXSef3QQnCmvgEngAhxr/pCeEyCjd1a54faaWy JHRELIqKowjE0f0ELqF1JqVpb0nbkdbwVGAr37yXybAPIDpgrBDboU/3z7TRzKtZ7jBu 4JbI9AMwt45iYVbjv5o4JxnmzCDFqPB75b+6z95hHgtst2T+5S7VVrLhaRD2hiaW8s3F SNnytA/mbz421QcE4aeRzYZXtMe75M15TYI0s0yvMfhzpvAyn1iPWnDRENiWyKTd4MpU OxVISO9H4slJSLIO57+mi8an8MFG2OeaksQ7qCOG2GDy6J5FXCl6o6Kn7aLFuFXqiKyG TDUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821190; x=1738425990; 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=OeHo9c/VM1KSl2EsYkHb7Xalf2iVdr+8YiL4SXj3SsQ=; b=eNUTGbaAQ/SzLyyXhdse5QKc6dUOQ4NoyQ1xZ97VgJbdxH/BHdBI3Rtfnci5Fly2mE CgBqsvE6M88JFWKjBoq2g5IJReBcbRt5oxROwPpJ8thwvTI/EJUhRN7bvy07LDLvspAp /ktJ34oboy8kTTHqeBB6MP6IdRz6CMRhLmnjvM8s+3HLzrGfOe2mTgBiNUc9Qz/8/pVc t9zdLYoYduZfdiwppUKI6ROhcVfzMtdbwGbLc2Rze8dBabJtFaCDpq9+qW8s4ThH5Hfa 5e+/tp5r64mcBUjdIsRKvolN8IlZfOJPn0N0CI8Xv9YIADO+LbuSA2qHATzSJD5qCGlw 3Y0g== X-Gm-Message-State: AOJu0YxrEk3kdKeFlarz7YduZQdErHJb7fBhTNaOEV9sYGFLuCUtuZfw yYGKEIW7EXaQCo3c/vZspjOw+1/3gJ9EOS3gZeyxLzWGI/f/a0P9iufmWijLNGcRSjtEQiwrRs7 bP04= X-Gm-Gg: ASbGncuKxzvlxsvet1HDZTP01uf7zDMzs/OYZl2uRKLXEZGtzg0bOzuIq1VDoknvcQP WVZgTf8u5TF07TMrBNncpL0zp6A8amGMB9YvrbE1LYQye6U0qASgAmDS7h9OQFOVg98qYK+LQ+9 FKT72RITONiaUW4QV83h6JJ0sqKsrMk5LwCya//kSCoXOUQuW5hPwYSQdesS7MVzJs6ltqz0xjp 4Gd+6RfjR4F75HTIL2uotpkWr6Dn/VUUZRVp2qm8AADnPndxN9qA6HORNP/fmmWnT6mcH9hPUwQ W11OLmMqQaxsrcZkkvvDp29jetO7AeW8mTyJkRaP0Nh1uFiXJS3m9vxnjFMr X-Received: by 2002:a5d:5848:0:b0:385:f527:be6d with SMTP id ffacd0b85a97d-38bf57b7fb2mr30390174f8f.36.1737821190451; Sat, 25 Jan 2025 08:06:30 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c2a1764b7sm5980460f8f.10.2025.01.25.08.06.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:06:29 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , Brian Cain Subject: [PATCH v2 07/24] target/hexagon: Remove CPUClass:has_work() handler Date: Sat, 25 Jan 2025 17:05:35 +0100 Message-ID: <20250125160552.20546-8-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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 Remove as unreachable code. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Brian Cain --- target/hexagon/cpu.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 0b7fc98f6ce..f77e305d611 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -262,11 +262,6 @@ static void hexagon_cpu_synchronize_from_tb(CPUState *cs, cpu_env(cs)->gpr[HEX_REG_PC] = tb->pc; } -static bool hexagon_cpu_has_work(CPUState *cs) -{ - return true; -} - static void hexagon_restore_state_to_opc(CPUState *cs, const TranslationBlock *tb, const uint64_t *data) @@ -345,7 +340,6 @@ static void hexagon_cpu_class_init(ObjectClass *c, void *data) &mcc->parent_phases); cc->class_by_name = hexagon_cpu_class_by_name; - cc->has_work = hexagon_cpu_has_work; cc->dump_state = hexagon_dump_state; cc->set_pc = hexagon_cpu_set_pc; cc->get_pc = hexagon_cpu_get_pc; From patchwork Sat Jan 25 16:05:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859805 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1322027wrq; Sat, 25 Jan 2025 08:13:48 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUYgzfi4wHVdfUIk/ziJ9ZtaidEtlBP84je3ul2tarh2lCQN79fly3qDfAPe7OP9hsJNe563g==@linaro.org X-Google-Smtp-Source: AGHT+IGBc8zG33jYgrDlzfFfdprxkc991cUsNVDBP4VidtxnoSYdprYE+rhfuJ5nzC68CWyPcibH X-Received: by 2002:a05:620a:288c:b0:7b6:ebc6:181a with SMTP id af79cd13be357-7be6324cfb8mr5526837485a.41.1737821627844; Sat, 25 Jan 2025 08:13:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821627; cv=none; d=google.com; s=arc-20240605; b=k2nK4dCRyNHAKudHDwrKTOjd5YLr51AIkgZ80OOJ43HiieJ0wzfVIKYNz9soHwnBkQ 3dAq5QoHS5sTX3IBduhF9mf5QV0CY8UHbzuvzbJ1DQNxlio6yTXgDowA9ehCqK9qMAIr Ie3pMJsq+jUl+NzfZpOoQLUynHMADY5wrJy+bYBuO3oP+gwnDSvV34+BmCR340TvNmR5 55DT8VHb7o8J/gJbpjWqY6lqJaJdY1E+bhaU4aK9tfd/3ln3jLtg8LPyTDDHJvqdpHcV HRvvi7pyzYzTJj5e5qUyz5ZWPBBenT4qf40Fr5lhlGaQYtlj9O4HdcxtEwrFOpzeI6Jn chIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=QmGm+j3d/J7g6/EQrq3KxGWM+Wnw1Wpe1ViwwNVT0iA=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=UREEKtOibwe/eckS91CV4A8HWCwtZXfjwSlXL5vevRp6S9/GvNdA+n/nmkvr4baK54 +DwN24cua02BbyDPvNiaUDAUma25AhPKnAP31fjOjpwupHLUyjqQKbMW5rbPR/jJlYjQ 3mPrDhSXvNhLbnDGAlwSRDtagpI2qDiJkTFa6X0Nv5jWNb8YnVIzhxXi6HIJToVQbbT2 X8S2JdkMokTwq9cr34o3VJk+g4RLQEogC8eqfRPu5MQJW51jlJLsTzEBUP6nAm0E/zaT iGdbqNBOzQz0W4F389xoH5IcovUEbYt0VLcwYdpGlm02EiUFRDcUA3izkCj/I4RRpRwF XsCA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UHbN2tTo; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46e66b679b7si54495371cf.335.2025.01.25.08.13.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:13:47 -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=UHbN2tTo; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbigI-0004SW-JL; Sat, 25 Jan 2025 11:06:46 -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 1tbigA-0004Q5-B1 for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:40 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbig8-0000k1-TM for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:38 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-38a8b17d7a7so1539699f8f.2 for ; Sat, 25 Jan 2025 08:06:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821195; x=1738425995; 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=QmGm+j3d/J7g6/EQrq3KxGWM+Wnw1Wpe1ViwwNVT0iA=; b=UHbN2tToduDTkJcJ0D4GLXiIYvPDcyYJESrXCYOD/jjBj5w6cxXbr0glx0Itn3tXFC TveVLUIbKq/lHuX5/DS799i1fYK+FJY6evoJqXkMeAHN71NmcLxV3xpKUNsF7z5p3Ftq waYNsWwSE+M0prF9+uc7Sji5xgNdY+GF2P2zhu5QGexFUpt9V6ZvueBCRHepbGRXcJK5 7/Uqsvq35+2sGxAalJ2xZ4l8HV6D8ktHNWXQu+ptCKvKtnA4mt2+NDIvGbaOTkLhskzW Cg0Im2DEsQ3yGCrZ3Vgd0HZDY1FotV48KQesbEeST7gK+UPNtiUbfYfLj+JEDb4RVjJ/ adZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821195; x=1738425995; 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=QmGm+j3d/J7g6/EQrq3KxGWM+Wnw1Wpe1ViwwNVT0iA=; b=NL4+dHO515kO8JduD4XicN3lCwnnsoEG3xUx4HFye/YgPwrUO1pHt+GjavAHw5OeNA NraXJFTfZd/4PJXLt/CCF92zxFSX4A4ZVWUfboAMt+cAXLrqPqHcsdF/hAXq3NViKztG /bA7EEbvWWk3fvDCByMiyZpVc6VIYcjUjCN0GR89XKZJpQ/q1ar/WxpXoU5IuTbwlCJx uMWS1ZFRct/Rvn5etgMsOiDxD4+QHNa1DJTL4zFANlk+9XN6nzYX8vFVyoDufItGectK enjQZpm0EEC8J0b8/GndJj0pb9lQX6eIeQ7rkp68c+5kYrSaBPpH2PfJgMOv42gNI98s cdmQ== X-Gm-Message-State: AOJu0Yz5Qm4gDbaTWb+L0eMGmAeJxXAv4uOJQfp0V7nzDgqrUjxus1EP It08Apot+S/VlR02SHXgqLZuYhWf6N4EOjelDyCk4YL0gOgJw4JEA5oE4mSwFykAZL0dCbTxINO BQu4= X-Gm-Gg: ASbGncsXKOZwzWmZzX8nhTCe4hmVJbN6ArdKPu+tkwI6f+djaBIZ6kTiqC/HIU+5ifO fJU5b4a3TnIA6G6TDKdHUNo03W7TvP5F8gZj4wGRTMcqCU7l80usuYfBm5qPkFh2ReYi5ABBwaj ocx05gTHQdWeKFvcHH6PutKD0RokjX44ZiDMHsaEVwy7wEsvKqDa4rICcEln/nOIro3Ywf3rCr9 goo9WroSBDf5J+5l3CwqfYuop0/jQFxBqf7KqrYF5lNdD1bX6eScG8lbfgJGgO/llmnurbxdS5h cCu09X947D+s/YAfvTdwV1VeD1kqb3Z3WTzDUEL37QaT1RjOLyU4vdJqnrtn X-Received: by 2002:a5d:47c9:0:b0:386:3e48:f732 with SMTP id ffacd0b85a97d-38bf5662a1amr34862909f8f.16.1737821195065; Sat, 25 Jan 2025 08:06:35 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c2a1bb04csm5949053f8f.73.2025.01.25.08.06.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:06:34 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 08/24] target/hppa: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 17:05:36 +0100 Message-ID: <20250125160552.20546-9-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/hppa/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index b0bc9d35e4c..d5a58a03cbb 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -125,10 +125,12 @@ static void hppa_restore_state_to_opc(CPUState *cs, env->psw_n = 0; } +#ifndef CONFIG_USER_ONLY static bool hppa_cpu_has_work(CPUState *cs) { return cs->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI); } +#endif /* !CONFIG_USER_ONLY */ static int hppa_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -231,6 +233,7 @@ static ObjectClass *hppa_cpu_class_by_name(const char *cpu_model) #include "hw/core/sysemu-cpu-ops.h" static const struct SysemuCPUOps hppa_sysemu_ops = { + .has_work = hppa_cpu_has_work, .get_phys_page_debug = hppa_cpu_get_phys_page_debug, }; #endif @@ -267,7 +270,6 @@ static void hppa_cpu_class_init(ObjectClass *oc, void *data) &acc->parent_phases); cc->class_by_name = hppa_cpu_class_by_name; - cc->has_work = hppa_cpu_has_work; cc->mmu_index = hppa_cpu_mmu_index; cc->dump_state = hppa_cpu_dump_state; cc->set_pc = hppa_cpu_set_pc; From patchwork Sat Jan 25 16:05:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859793 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1320708wrq; Sat, 25 Jan 2025 08:10:24 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVECj3CzQq1FBaX0YjquGip7PMMEGdmVSIcWI1WED68QMt1e2xhPnWB+q/1ilc1ulm5rpykgA==@linaro.org X-Google-Smtp-Source: AGHT+IFJO+FYiyTdgAddAna8ZWr7ZI6IE1UUy0/s2Ph2D+kdu+YPftQDwfUnQuJQlKS4IytrgBuO X-Received: by 2002:a05:6214:4599:b0:6d9:87d:66f4 with SMTP id 6a1803df08f44-6e205efcb27mr137912246d6.8.1737821424290; Sat, 25 Jan 2025 08:10:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821424; cv=none; d=google.com; s=arc-20240605; b=PT9yw+Yy0Fc+nsWKJT0EpbdBNM1ilRNxNKUpTM6QyGFzp4PoxZktq20YnHz2MQ1gFp mfNprJJzH6tXXfCowJeD72z5jNUVC+tvcRsGuWiufMUm8KEt84gRCbBRT3AT4wmFytMX NgkpmJJOfDGlY3kDy7XLszPG2nO8PUzGWrfSwmhf+xw8eSjobyAVIYYlCLn0bcqmGLVm Rlc2r6V0k/9/zoeDe++E9IxDOfs/cN0X9fHDUtfH+VcZvLuGsFGjD6tcWfnQRAu/BeXN DHSWSYvcNdhkT4Y9nm8hv15vUdWSh162zg91L+pa7A1w7k5nCUJO0RylgVD/BiAgJls/ +d0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=SFxXNpC5yVfbLd+sXWLwj9ZcwKFDj0iGBJJhc1kZZeQ=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=lrS3Qihg3iYxcUuaxZUHUAqXnz+UZ+UIOatNAlAn/BdJpBhC7E9HArMwX9RPDxa/Au COADkU/mdTbYld0Qyjdw3V6gQEz304c1Y18HX6fwy5Aty0HwCp8nPJO3WClF1EV9ApDw gUzlYHuJ998fyphn3vq9aPRW5qhJ1lGgeC71U/30mElAO2XcSW+dF3r9oPnxNKkSPFwn 646IGzfp1MzTl0rxOq4WuKceaOPo6vQfIwqTDlLZpkM88Er5RIHu2vsI9P2f0sy7bODa Agr5EbLFHDKUDqmLpkPXKSGQ9o8FNquZB0DPXN0OdiQpPQqKJIsIxQMaX4UvgEn2jxHq vxrw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ooKhTioM; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46e66b87ae7si53665241cf.413.2025.01.25.08.10.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:10:24 -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=ooKhTioM; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbigN-0004cw-5b; Sat, 25 Jan 2025 11:06:51 -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 1tbigF-0004SC-P2 for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:44 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbigE-0000kV-25 for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:43 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-38634c35129so2770855f8f.3 for ; Sat, 25 Jan 2025 08:06:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821200; x=1738426000; 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=SFxXNpC5yVfbLd+sXWLwj9ZcwKFDj0iGBJJhc1kZZeQ=; b=ooKhTioMfOLQhxxJBHpcBOA5SGRAs0ch/ObzD9QR3Vc6bZJQ8RTxVoOtr7PdArKFwY mSfsJ5Gxq5iRbMZ39Hs2zvda+4t6ldWJRyFA9tEhOc6+EM/3nIZfB3BtplGh/QyRd7EC IttjAUCt+Oix7Xdcb8d0qXTgk9Z1RtSS9+1CjWgApxkG6CHKlffzYGrrj0Hi2ohgdig2 lePf8MfkStwr4J9IgfdkskTazSix3gwi7nLKzudSJIHde7DRpkVVyQaFPuZFnhD2y3PK MsTQmF3nRHlMvpHAs+MeuIsu8yXEwB8AVON+DtIqivP0b9R1Uw1wOdHc24Kg9yOBeWZC R0Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821200; x=1738426000; 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=SFxXNpC5yVfbLd+sXWLwj9ZcwKFDj0iGBJJhc1kZZeQ=; b=vpbn9FoGkWAH5GcLUf5KNBlEUOyUFsOFrXo9txjNjVrCg8XmqUSyciQTC+kb6ZFAb2 LqPDwyO3CWUajJKx8HYQ8KZOl8xmgTYWkScoshMpHSvZrH/tACzptV/7RA3IlsZokZDW ZsFUM6kwIft4uAGJ9vypNTVKTA/YTKW1zS3Zsey89pSiHqD8H6y65yVnEVKohcVAaQiO kWtYu6+LQoZNv02PmSD4FfpGzVVnvrmyyE+6KLElPboq+bW3Rd86Bi1kusMr3YRacmlT JIcpqcA1nhD76oCyhai1MBwo5yjmUQDEj7HvBSEWLeIECKUZ1BS7qq6fdC1aXXQ59Ipq RVoA== X-Gm-Message-State: AOJu0YxVyJ1GpLFO3UmCQSUkQ9BruyYGrXtAKTel9xP/HIb5Hlh5bJ3I joNI1KM73CHxZ7GDXxgcG4okUw2VCMTQJft8ytItpPyZfKsPg6DHXswN1kjnu5UNV0wTtIlQ9lg l4TA= X-Gm-Gg: ASbGncv//XI4dkh+YYfp4MDiCN2yKxrbIsibNQCy2zeE4mRVE7wf6M9xIklDKanGvXw bcy2pU8T/OQxJFHZfgcTdoaJrKFYWm62/8RoQWs/zLemrQ/hXWbt3QijF5R39c2AwPvdxlMRMyf lCKIsEM7y2DLv8J5in+1INuPyq+I5NMPWpZijlt/AC9t5E6HQd4GJkWIL9qgLy/iHv6tbLWWVU/ p4FCFBwd1rcZYDRU4yzUmsD0CVxTEfl1+AM5FYaBAiyY7bP57A6KAMMjixx7FhZ19sPtrobpr/L nyC8TyrUIohs6w/RYnHhkkNfzqxVn83GGz88OXBwUvPUBOX/T+TKfbJEg7em X-Received: by 2002:a5d:5f56:0:b0:385:e176:4420 with SMTP id ffacd0b85a97d-38bf567800cmr33027278f8f.10.1737821199685; Sat, 25 Jan 2025 08:06:39 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c2a188d5dsm6088635f8f.55.2025.01.25.08.06.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:06:39 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 09/24] target/i386: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 17:05:37 +0100 Message-ID: <20250125160552.20546-10-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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 Move has_work() from CPUClass to SysemuCPUOps, restrict x86_cpu_pending_interrupt() to system. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/i386/cpu.h | 4 ++-- target/i386/cpu.c | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index b26e25ba15e..869b8598cd5 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2289,8 +2289,6 @@ struct X86CPUClass { extern const VMStateDescription vmstate_x86_cpu; #endif -int x86_cpu_pending_interrupt(CPUState *cs, int interrupt_request); - int x86_cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cpu, int cpuid, DumpState *s); int x86_cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cpu, @@ -2313,6 +2311,8 @@ void x86_cpu_list(void); int cpu_x86_support_mca_broadcast(CPUX86State *env); #ifndef CONFIG_USER_ONLY +int x86_cpu_pending_interrupt(CPUState *cs, int interrupt_request); + hwaddr x86_cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr, MemTxAttrs *attrs); int cpu_get_pic_interrupt(CPUX86State *s); diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 1b9c11022c4..51faba4e0b4 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -8256,16 +8256,15 @@ static vaddr x86_cpu_get_pc(CPUState *cs) return cpu->env.eip + cpu->env.segs[R_CS].base; } +#if !defined(CONFIG_USER_ONLY) int x86_cpu_pending_interrupt(CPUState *cs, int interrupt_request) { X86CPU *cpu = X86_CPU(cs); CPUX86State *env = &cpu->env; -#if !defined(CONFIG_USER_ONLY) if (interrupt_request & CPU_INTERRUPT_POLL) { return CPU_INTERRUPT_POLL; } -#endif if (interrupt_request & CPU_INTERRUPT_SIPI) { return CPU_INTERRUPT_SIPI; } @@ -8286,14 +8285,12 @@ int x86_cpu_pending_interrupt(CPUState *cs, int interrupt_request) (env->eflags & IF_MASK && !(env->hflags & HF_INHIBIT_IRQ_MASK))))) { return CPU_INTERRUPT_HARD; -#if !defined(CONFIG_USER_ONLY) } else if (env->hflags2 & HF2_VGIF_MASK) { if((interrupt_request & CPU_INTERRUPT_VIRQ) && (env->eflags & IF_MASK) && !(env->hflags & HF_INHIBIT_IRQ_MASK)) { return CPU_INTERRUPT_VIRQ; } -#endif } } @@ -8304,6 +8301,7 @@ static bool x86_cpu_has_work(CPUState *cs) { return x86_cpu_pending_interrupt(cs, cs->interrupt_request) != 0; } +#endif /* !CONFIG_USER_ONLY */ int x86_mmu_index_pl(CPUX86State *env, unsigned pl) { @@ -8544,6 +8542,7 @@ static const Property x86_cpu_properties[] = { #include "hw/core/sysemu-cpu-ops.h" static const struct SysemuCPUOps i386_sysemu_ops = { + .has_work = x86_cpu_has_work, .get_memory_mapping = x86_cpu_get_memory_mapping, .get_paging_enabled = x86_cpu_get_paging_enabled, .get_phys_page_attrs_debug = x86_cpu_get_phys_page_attrs_debug, @@ -8577,7 +8576,6 @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data) cc->class_by_name = x86_cpu_class_by_name; cc->parse_features = x86_cpu_parse_featurestr; - cc->has_work = x86_cpu_has_work; cc->mmu_index = x86_cpu_mmu_index; cc->dump_state = x86_cpu_dump_state; cc->set_pc = x86_cpu_set_pc; From patchwork Sat Jan 25 16:05:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859785 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1319734wrq; Sat, 25 Jan 2025 08:07:59 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXpV309av025Gyeo/M/qVm8Ko+byIYD9BZC4ZrLCnOOPNfObdLuCxUJnllPbGBkBi9YphdSKQ==@linaro.org X-Google-Smtp-Source: AGHT+IFluWxM91aNHYf1vdImXSCcrru/Wb3YdSYTXMaksdjYAwjtey22mndVuMvIFCjpsHzcVww2 X-Received: by 2002:a05:6102:e09:b0:4af:ef82:ce8d with SMTP id ada2fe7eead31-4b6f77840cfmr9059214137.0.1737821278779; Sat, 25 Jan 2025 08:07:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821278; cv=none; d=google.com; s=arc-20240605; b=eWatAEd7mDU8lbDieaCjxy/VznReDTl+/lKULScZ3kmvEVWTTMGX+p1IeC4IVZMVS7 Bh261IPLEr9r9TkbvMLVA7giNQbKYQcgCLPPIxlrFO3bpf3ckMlxn9uMpioDqSWptUZW 1zQ9mbmrrGeqaXtkeS3aWWHaueWdiLJKUvCKqphPVVwSHpMXd0ALKne82fvsot3W0O5B ueni/0i3r1JruWzSNBr9TfnLLADP9H1fOYFHYAYSeY6biAYo/WXADVowbrkKj8hmnEke 5Zb/jbZU5HiFDEKOgSgkT/tTTh8aPkj5uz1CzAGaDdikIPpbP2jtcoM6xg9r2mwFdEyj Fu1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=srYqpBi+i1JHdcQoMXjqQayhwRKKfnrZUrD1yEs/h/w=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=bFFNyA5xmI7ffACZJC10SWjLrOO06QjuFOcF2BObvkssx+Eu8qrvbjtBOO8D+uFdMa IcSn3sfsdqxkNATHw0ydf6u7UVd2srHQcdQrn7Jgqh7grrzApYs53mQ3dbJ5J41jQaQm mAaPv820EL9cytamVmllDI7dpCCRZ2HWmSdi4RM6oDtIAXXgH+lQNZuNqUqNBrl5DCbR gqZCclZj5dEz8qBcFxg5TbJ14PYQeLqVNap7n8tS6jA980eeebKQFxn+Pxw8Megw+FnD huuVMDtTsyXfagnbK+McgDWa9/oeRJNg0KZM2JIhU2fSeqxReG5NXL+GaVFM3gvvkqqU dtwA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RBW5FcgW; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4b7099fc318si1454318137.545.2025.01.25.08.07.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:07:58 -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=RBW5FcgW; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbigN-0004fm-P0; Sat, 25 Jan 2025 11:06:51 -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 1tbigJ-0004UQ-Ht for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:49 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbigI-0000l3-3L for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:47 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-436ce2ab251so19732115e9.1 for ; Sat, 25 Jan 2025 08:06:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821204; x=1738426004; 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=srYqpBi+i1JHdcQoMXjqQayhwRKKfnrZUrD1yEs/h/w=; b=RBW5FcgW4VuHVfxx2aldE3jDYLYgjLtGzSURw3WzaOJ+eWgyFDscuX0hTdX5xlSpvx zVUbL35L0fCu/7DbddAG0QUmPoZGgDXR/Ddw1d76Gzj3LrfNraT00BiC/oiG9PzSd0jW LuWtPi83GPblKgzvGuaXRmieRB/kNmfvqLi1rDfaznxmWHPP5H4ug6snDxHBwxZ32GUN EMvHDR3V/ozwhV9rq1Fq9FuV2DFDE7kr0jRLAQT+MJgBnv9MmmWTmNt1IXyvpDjyPYGJ HC2BaRdWeyihaWXjOU2IdgUQP2k5+r9OCDxf3HoebxjzQC4qJW9fwyN+D4a+1GWtjOXF 4GBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821204; x=1738426004; 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=srYqpBi+i1JHdcQoMXjqQayhwRKKfnrZUrD1yEs/h/w=; b=Z5X6Ky7o5KotnesYb16wWMWoxN75Kx1dHWIdZ0ytsc9a6KCouUH5kMajlF6y0xVosc k5f482nJolX7sBu8C87lbmJnJEES5K/jkUM2AV86hfoRANyUh7vnVl+GKFIe/S962/o0 iTWFqD2oCL0jxKhpgeFZO4+4ieqXJJ8gRwG3V0XvtfZ3QHAkiTZNHBMQABBd86ausHHm 3EDPuMNktGbV/oWXfOjhR4E1lDbFQGAitqLY3mM3Ywl8BSzI8F/+iDkh5xuR5j00Fypp /R7/jcu0K0vyl+0tpC6bK7XGc2CAK+8ucJ/t2pZVa1kGHueeCnazECGrNLhF+KJJBSfi 0Rqg== X-Gm-Message-State: AOJu0YxPS3hLE5E95ZlWXSlMORK9jXS9B8s5ZZyvBFG4TGJvSIzQcHTt /nbQeE4tF4mbr50KNPQ/xvf/kP6LQqg6EF1f+zyarZiXMZDsN5vEXffTUoOVJmaHDDtuk+/lEKB gC88= X-Gm-Gg: ASbGncsFR27Kj/FiO2YUAG9hp7+Zo1Sio2wrqQFUrIlRgm4VERckYO6W8/mc9sgsI3F Mcz2SEf4NEHWxWbCxP3LFheFPJQW4tw301o5TGaOdJzrO4JP/PLbBs6NUa8GyM85AWMTdthOugX yRyuUyUhgeh6/dRn5TRXtg0GyL2XFyT+1grHA+p43pAI5C4uEAdYd2ucxX6JSZ10HFjk9tmfVLX AlSxRvi0um9vuUi/OtDh3SFTiKWOj341nk6fqe069oQX2iDhfwgf6upqz5TFp0GmLHo+DEbYs7e ZF4oI+bO3TDg0O6DhMq6pLUlgkZctTpYXlRpbbmaRiLXUvKRYoiFRxvxK8LO X-Received: by 2002:a05:600c:4e07:b0:434:a802:e99a with SMTP id 5b1f17b1804b1-438913bec32mr310554025e9.4.1737821204358; Sat, 25 Jan 2025 08:06:44 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd4fa3efsm66192825e9.2.2025.01.25.08.06.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:06:43 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 10/24] target/loongarch: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 17:05:38 +0100 Message-ID: <20250125160552.20546-11-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/loongarch/cpu.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index d611a604704..20aba0e1fff 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -349,11 +349,9 @@ static void loongarch_restore_state_to_opc(CPUState *cs, } #endif /* CONFIG_TCG */ +#ifndef CONFIG_USER_ONLY static bool loongarch_cpu_has_work(CPUState *cs) { -#ifdef CONFIG_USER_ONLY - return true; -#else bool has_work = false; if ((cs->interrupt_request & CPU_INTERRUPT_HARD) && @@ -362,8 +360,8 @@ static bool loongarch_cpu_has_work(CPUState *cs) } return has_work; -#endif } +#endif /* !CONFIG_USER_ONLY */ static int loongarch_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -835,6 +833,7 @@ static const TCGCPUOps loongarch_tcg_ops = { #include "hw/core/sysemu-cpu-ops.h" static const struct SysemuCPUOps loongarch_sysemu_ops = { + .has_work = loongarch_cpu_has_work, .write_elf64_note = loongarch_cpu_write_elf64_note, .get_phys_page_debug = loongarch_cpu_get_phys_page_debug, }; @@ -860,7 +859,6 @@ static void loongarch_cpu_class_init(ObjectClass *c, void *data) &lacc->parent_phases); cc->class_by_name = loongarch_cpu_class_by_name; - cc->has_work = loongarch_cpu_has_work; cc->mmu_index = loongarch_cpu_mmu_index; cc->dump_state = loongarch_cpu_dump_state; cc->set_pc = loongarch_cpu_set_pc; From patchwork Sat Jan 25 16:05:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859796 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1321565wrq; Sat, 25 Jan 2025 08:12:38 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVo35pEfUdSgWn0bJ4oPnooYOQd5oD/Cqwlm3U88gzhkdjcUDiSa3rJYJVMkNb1S/Tbhalmeg==@linaro.org X-Google-Smtp-Source: AGHT+IH9nk4ipT7/LEL3F69h2kEZoYKjwEZlS4+FJweqLFIKepTLtsIJchF6NM2oFT7rUzYjqK4K X-Received: by 2002:ac8:5703:0:b0:467:5d5d:fabf with SMTP id d75a77b69052e-46e12b6f80emr500747261cf.25.1737821558587; Sat, 25 Jan 2025 08:12:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821558; cv=none; d=google.com; s=arc-20240605; b=gS1vT8FU+T03SvcQMNubWawoxburhjRJdsoiYjowXjG5Q9OPT8pGgg033V6orluS7M Y+2dMWBfgL1n1wu2srNHRQY6VZUvEeO0Q0hvrzIHQvRg1ojbB0mVidfqz6V/b7hsl6oT 8D9mIPtGOygiuQyE+TzcAr+jQjfkq1bi+XtxN/CQKQDCXteH7MI3Vuh4e5rH4uCEPxX7 FA4h0WmxkcWfeW7zGPkXTeWLfeQk5A8vq36lah/aPdnBCYBSzjbSjVC9a5kZlTXQQ3/a P6Cr5uJnFhrsHcjcD8bjkHJui6shkaT4WV12+MjlEc4fXzO1HZH1LaVsqAih+Xz2TinI fKVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=yoQ5t8eM4wCpvT97M9dMQOs6qSsBVPtoxCHVU1aZxhE=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=LtrkwTOTlN89R7UB/gukA2kfQlRQr2DQ0tyUpFvKoiD5boCLNhacV2rim1i7xfoisZ dva+jcJ3dkLYrFBe1C12xMgwFU348w4Boj49Z2EwcBygc6uu70mdyOt8u0q1HhZYsTPF DdbB53vI1j7s8xuFfMbm9uQybZaXI85jLXjpN+mPMBRUSwCGqBhkWY9zNKy2fNwP6de/ ZziIQHXv/Sz/dYVY3YQ4SlLNVsKM0SSpYxj5KAySTqLCyPF5u2P0sSzjAvJhOcD61/21 OqqfysVqjU0tVeyzFwuuBEqNwtMSIN7PLRYZ9TyE/3Lwp1PKqnkyyx9m2Gj/STyE5x0C /OUQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g0kUjjDr; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46e66baa793si49301531cf.587.2025.01.25.08.12.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:12:38 -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=g0kUjjDr; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbigT-0004nC-Es; Sat, 25 Jan 2025 11:06:58 -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 1tbigO-0004hh-F3 for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:52 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbigM-0000lL-Tr for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:52 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4361b0ec57aso32239165e9.0 for ; Sat, 25 Jan 2025 08:06:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821209; x=1738426009; 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=yoQ5t8eM4wCpvT97M9dMQOs6qSsBVPtoxCHVU1aZxhE=; b=g0kUjjDrpKxKA7Y1DinBul2kfZ5n2R6fJDH16aRNRzIpxlH3OOLijPFciJrnMmwuGI wUq9CMwme0EMWtqA72b8diWyU8MdfSnIAGHrIqLgFqPd2Kw4702iGEQqs5HcgLS1eWzw D1TtwGB+5W+MfuMj12pWG5+nkhffLXajGdaFjjxcixWZKXDzfCQmEb9K3R7z9TcP2mI+ nVNF4/bzwlGPwV0KGaxJLCHRiyE1itKI986x8Pzc5g5hTzi9oVbYu7+Hi3xYoKfdCBeF N2/9pHKXxIjVNsUxRC6VgA8mnlthBYcS2L6WjgfH9+E7X4iF2f8FeEoRpoZVWBIxJgGL k3ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821209; x=1738426009; 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=yoQ5t8eM4wCpvT97M9dMQOs6qSsBVPtoxCHVU1aZxhE=; b=KFq/pJ4uJQvwjJmnssNciHhlgPgNC7Q/l66NEcogaxDAQiPio2yJ8sbpkZUMLx1wSb mcKeYEhAr2UBYpdasGpEDt0ctid8eHeI6nzT3CzPA4bxhqGCOriucpHT9wna7mbQbXzX yxrx/O4eJMuFcYzHlIE1H3JNzATpr92DeJzil50Mng4VlP6sW9NT1rnNAV8Y/tXGeZcX Q4q4s75WIE11VvD4pg+fnlFZl4TFewzfkyrjQZI7UOZ/CoWVcRYhBq2d+DEzKhaDDNpZ +zuEJUIVwmgFpXEP/QlNjBjpWvQA1hENufa85oe3jP17KE5Z5aZsZzrewKvKbtSxvrAC 81ew== X-Gm-Message-State: AOJu0YyhkSLC/VjaTUvE5mKq82Ejsui+/doR8n/vxmF3h64Z4QvgAFSD QbivrIBApmBggZ60DRp55tikLBUUpqYCU5lLM9QHtkhJBC3Aokt5OumiU40VUGcRpbVbwA/bOgS XFcI= X-Gm-Gg: ASbGnctbYPdxYGMTZktpDygwtLja/LR+uQ3aiPJtoqByaHITsChxwT1pEa/70L2z+N6 ifKdeBdgizGH6MNuXCA67+wo3CsF2OD3TVZeC/Tt74PWyUFpTbli/C9iKrHV9klh8xKHROU7KlM LFlmfkFPFX74HjYxbxG7dpYXfEz4j0h/yB3GcWkWThTciQR6rVG2Irug0ThhuM4RPU91vDAQWa6 g5vvMmy2A17++zE8y99VIA/HqjUW3sWQFAWZsL6TxXFisV0iCzW7tuGXGJxFdE7HGbLMwwSFTSY QubWxfyuA9GzyngI4Z5RRsGSwFFqT+NQMrOSH8tU56JFlbe9Xr9NDG+f2zpH X-Received: by 2002:a05:6000:1f85:b0:385:e374:be1 with SMTP id ffacd0b85a97d-38bf5662b18mr33155014f8f.13.1737821208961; Sat, 25 Jan 2025 08:06:48 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c2a17d70bsm6061750f8f.33.2025.01.25.08.06.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:06:48 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 11/24] target/m68k: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 17:05:39 +0100 Message-ID: <20250125160552.20546-12-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/m68k/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index 41dfdf58045..eb7fb4f7e4c 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -51,10 +51,12 @@ static void m68k_restore_state_to_opc(CPUState *cs, } } +#ifndef CONFIG_USER_ONLY static bool m68k_cpu_has_work(CPUState *cs) { return cs->interrupt_request & CPU_INTERRUPT_HARD; } +#endif /* !CONFIG_USER_ONLY */ static int m68k_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -543,6 +545,7 @@ static const VMStateDescription vmstate_m68k_cpu = { #include "hw/core/sysemu-cpu-ops.h" static const struct SysemuCPUOps m68k_sysemu_ops = { + .has_work = m68k_cpu_has_work, .get_phys_page_debug = m68k_cpu_get_phys_page_debug, }; #endif /* !CONFIG_USER_ONLY */ @@ -576,7 +579,6 @@ static void m68k_cpu_class_init(ObjectClass *c, void *data) &mcc->parent_phases); cc->class_by_name = m68k_cpu_class_by_name; - cc->has_work = m68k_cpu_has_work; cc->mmu_index = m68k_cpu_mmu_index; cc->dump_state = m68k_cpu_dump_state; cc->set_pc = m68k_cpu_set_pc; From patchwork Sat Jan 25 16:05:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859786 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1319837wrq; Sat, 25 Jan 2025 08:08:12 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV+xLs/r4CFSnV2R3BYA7bzhOZzzOvV9Dyf8ZSWWBcXx53IK4bwdADz2aG7RCLHJi8zlAaCRA==@linaro.org X-Google-Smtp-Source: AGHT+IHLC0NLKDvIc17/cv1D1MSEXgmXF34hCDBM5rvpEGDJuTKHkHOrKC8k7MLPFy1fwrc3262p X-Received: by 2002:a05:6102:5043:b0:4b0:49ba:8278 with SMTP id ada2fe7eead31-4b690d0ff79mr27693722137.25.1737821292548; Sat, 25 Jan 2025 08:08:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821292; cv=none; d=google.com; s=arc-20240605; b=QBDFl66h/lR6/fbUpbokLrkNIVltOAjbw8oeQvdtnVTAG+EkAjbzF4i2zdSd1OLC3O MgRQN7CfH57l8ws/lka+6jqDAvySdEjysR6mQIj/licqrbIJkkBGk3GLNyd/6KIMQuSO /WydEfvgd7w87e1PzYN7ZJm6X2TocY7LQ5tV3Qlb7dtWpF7XggAaY6O3CeH7uT1KLPjL I62upWThkFgpKIQm+DAiNVZPEPl8251jTdLPuCiv51Ku5zq79Wqab++550v2SQtJBI21 OvqTk0gcMCnUmsu2UNPKhp6NHDdhemgB08gkl1m+XPsa+gAgOEeMgtuSdouDCMQ8yt54 30hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=MxDvorJyhEvTzUUQpDwPeiHnLMk9jCN8DN75q+YWX5k=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=TP9O0XKvHJfCgs8gLCGW7jvnd/rMchN/HHalZoeAGJuCm3dtwqWbDXUl6bv+Hbcxs+ X8Kc7isbniFlXQdjdkrh8U+3EjCw4Inr2X6uz4mwtNk30pk46SjBxoizmErzHVdtQ6Hq SrwcYYe/t5YGV+R1CkhGFkLkXUT5qr4sPJbda1lMoCwHkV65d9Nc2laJhhXlHdSeGSsA cFmnWP4RBCLhEkIh0DilDPMRlFtpcP6S3G3lIJtNrs+yeFzu8fl1jgeiffFDuhTRVhLI ybGe2UVuOIZzlNfGbnUydzdAJZaHnnpwUth1RlDA4gzcGxNIV/Iwe7tKYwtBHCvF+pE0 c5HA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o6l7Ge5k; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4b709981b74si1904318137.318.2025.01.25.08.08.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:08:12 -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=o6l7Ge5k; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbihQ-0005NS-0c; Sat, 25 Jan 2025 11:07:59 -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 1tbigT-0004nY-2e for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:57 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbigR-0000lh-Iv for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:56 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-436249df846so20390595e9.3 for ; Sat, 25 Jan 2025 08:06:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821213; x=1738426013; 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=MxDvorJyhEvTzUUQpDwPeiHnLMk9jCN8DN75q+YWX5k=; b=o6l7Ge5kfvblG8oywqGfAlCg1eMUnlHju2cg6j/2rj9a3FunwW4m1LfBSldI7w6giJ Rv4pFNTdlcjpg9yU6krFe8NqB+ZGxG1u1GHRwWPkPLFsxd4pvMMbGoM++OQMiGAZL2HX udgH/10uDZhogvr6JGIhzmSIGrNEf1qUy0LS4XdI5/6GegZi9MRx9XyrH0j+pQmbaYlY uOplNdSpONsM9gpcFduRbLPKV8HwfR2PKB7AqGAqukQwB4J0rc/y6Wg/DFR/hB7c76Al nXhvq+q0sPiN+8JkI/eBc0yILvidrsPAeoy7fUMxvNPgQrPCOOMstPfP4wFkvDkwzu+8 TF8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821213; x=1738426013; 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=MxDvorJyhEvTzUUQpDwPeiHnLMk9jCN8DN75q+YWX5k=; b=Rc/ayEyb3Y1KYUA6hgKueC9tBpUPBw93ZwnJ4BEP/v4082wMMMYeGgnn3l9oHOuoYx AdV2NV395wK90kyFX5jbEkCBJ+ac0ZgsJfMnNnhQUwXYKzdW/50bDmRvEebdmeGhIDQy sF37HbQ7Y+DOg/3PWU+aZp/0j1eOR3dEQpOon6VRNdGbE/JKwP/7fwBf4jDIRjWn1t60 0p5KARHlMn+fUFRRrP+mk9gnq0qdpf6aHa8dOulXe7WUHVTTNZLYb0UE+XST04wutg4h XE+wGztqVR6qU4i0lYHxK8/WNotIxTMpY86qx4RQACbLb3Wuyxc4q4X8MNb58EZU3jyb t16w== X-Gm-Message-State: AOJu0YxrRrC2Pt9npIg/Q3z9XxomTSy8AW5/Si8MqZeh1vPspmnqtXGA BCRjjmXMY/P6qiJ0FDXn2EEkIam+mNIrpEMs1KSk4gCiSPn0N+XF0pWkVGBpm6vMGAN7kSN3bpj Y/Ek= X-Gm-Gg: ASbGncuft4a4QbCE+ml2s8fxk0wpv5v3JazwFtiFCoA+Esu7CntSVDkvpwC8bXOdWaD f+0D2Po4XvqsNePeMs6NJhWAFrUx9YK0DZxoTPpkqz9faAf5cMPJzXhg3q5kh9EgnI5jG11/DKM GvLCNbJdspmUxwEXU4HbQLBWUTStzVLYctjur4JJCkfs/2/0IOGdTy1b9/3CsUbwgXxtsCtyAxH A/KVMzWffhh7m84Oag/kei8BfUk9rQxZe18STzvF4fmhHftPKk4ePqsZHJaZwfDB9FR/OjWVG+7 Z7+EAG69NdbtxpsGlruYRW33JA0/Q0idC+GQaa2faibvyTNNWsIB0+gQRrjL X-Received: by 2002:a05:600c:4ed4:b0:434:feb1:adae with SMTP id 5b1f17b1804b1-438913c8604mr317792555e9.3.1737821213570; Sat, 25 Jan 2025 08:06:53 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd485007sm66492205e9.12.2025.01.25.08.06.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:06:53 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 12/24] target/microblaze: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 17:05:40 +0100 Message-ID: <20250125160552.20546-13-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/microblaze/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index f114789abd8..7a90cb3016b 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -115,10 +115,12 @@ static void mb_restore_state_to_opc(CPUState *cs, cpu->env.iflags = data[1]; } +#ifndef CONFIG_USER_ONLY static bool mb_cpu_has_work(CPUState *cs) { return cs->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI); } +#endif /* !CONFIG_USER_ONLY */ static int mb_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -415,6 +417,7 @@ static ObjectClass *mb_cpu_class_by_name(const char *cpu_model) #include "hw/core/sysemu-cpu-ops.h" static const struct SysemuCPUOps mb_sysemu_ops = { + .has_work = mb_cpu_has_work, .get_phys_page_attrs_debug = mb_cpu_get_phys_page_attrs_debug, }; #endif @@ -450,7 +453,6 @@ static void mb_cpu_class_init(ObjectClass *oc, void *data) &mcc->parent_phases); cc->class_by_name = mb_cpu_class_by_name; - cc->has_work = mb_cpu_has_work; cc->mmu_index = mb_cpu_mmu_index; cc->dump_state = mb_cpu_dump_state; cc->set_pc = mb_cpu_set_pc; From patchwork Sat Jan 25 16:05:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859800 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1321705wrq; Sat, 25 Jan 2025 08:12:59 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVIy26kQrRcOTK+e6JCGOglk5liCbVAaJXFASiJD8Mf4sKCSOTliKsTSOm2r1zULJYi56uztA==@linaro.org X-Google-Smtp-Source: AGHT+IE7E2q235RSYTXFttbpx9Ni15W7bfmzH279iw3syfpxzGYJligenJswdNLYYr4n1H5mzhbi X-Received: by 2002:a05:6214:260b:b0:6d8:92c9:12a0 with SMTP id 6a1803df08f44-6e1b224cc1cmr519042046d6.44.1737821578877; Sat, 25 Jan 2025 08:12:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821578; cv=none; d=google.com; s=arc-20240605; b=aP8kO4JsLsZtoLwnLPpP30+kcLX5CjcFiCUm82DRV9h26Bb2POozgFbA+QtljM4CeZ N+Dm6bd2DhxNOFNloAkl1UeggHie9YmZcFmcZ9n3W/XwvKuIpDtLJbtvXEKEw3Ydf63j I5K4LROK+m1fYXqmhYdSyFop9c3Czi9S9jRfkH7pS1zUdCkQhwqAkCg2uSvAvm6CX2g1 /hg6D+v7bOIOWBvp/Yci27xo1bOMjdUJGQ2XwEm+MaenFlxV52kT7nQkTj/Ovwx7M2yz fcy/TZxWqQrE+mOtYFhNj7omsgyxT5lTr6exOKdj409qcFLnrtOUTrbwAOJCusNtCkUz sPFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=McaXcSpNynHCA9tSKGj/1Op/r9CMceoElpHx5WUOIrU=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=lAsWUzKpf0vXcCRnArz9gYAXZQQlCOIInm+f9lxFQWOZKncFU4RIFM4/vSXUWfJrfR Duk9Jn+CHmsUbJJE5YSPpWRLOezZ9sXIuzb6ppQmfK1NIcpxHt9cPXT7h5cUBplayNee mzFoz7qSSihwbujjf2lsAWSD4y4wFngo0nllYyyaX3+bMLIRK4AIyS7AsrUtTMRn2v9P Hb1Yy4+nHw+H+RHmJR7drgwkcgW4G6zXG/KFSUqyLVNS0CmByrlHjG7J57KhYRO4v0mM 9hTSX4QDsUFVPV0072jD4Td3SNU3gEEMYE3po4jxyLqcNftC4egLt8Vg7K3ljyVUATDW qk2g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mmfL5Qy5; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e20612f634si51478856d6.469.2025.01.25.08.12.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:12:58 -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=mmfL5Qy5; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbiiN-0006Sr-VB; Sat, 25 Jan 2025 11:08:56 -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 1tbigZ-0004xR-2h for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:05 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbigW-0000ly-Nn for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:02 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4361f664af5so34746425e9.1 for ; Sat, 25 Jan 2025 08:07:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821219; x=1738426019; 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=McaXcSpNynHCA9tSKGj/1Op/r9CMceoElpHx5WUOIrU=; b=mmfL5Qy5chrnB+SXRHGG3XajjavekGTIS/CYQ4xqRIMSwtIDDzVkVC1GvsxXt2ijrJ sI8h1iiPa3F/KNUXvu9a7wdrT+sehQEGwNP7jZ2UZPwmuQJPqLbrPvST+4U3zRwx9N0M CDeFIZqZ6yzOXHBhMl7FK1be10sL3ymuakxC5g6om3H5KZWc/jphYb24xXSWsJ0QY/lP mLBBvlFWaRAFelinwsAUCGspptEYDnpgXMY+GVQ/PZV8a657Xr83wRwoVoa5g0u9q0kh zgu5NKZUlR1GSGJqaY0FLAmnzVZRiE4klzDXg6rYgNtrrghma0w8TPQBsmjDHR7s7wVO gHIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821219; x=1738426019; 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=McaXcSpNynHCA9tSKGj/1Op/r9CMceoElpHx5WUOIrU=; b=ZRre7hCw33Nw0l9SwoNkpxyh7Z/AYqslmibgXUCPagAr4brcCOhEYWRQwTDfpixcs9 ovu/6T1+ynUEuj18xO9Ix4FKxLXMzzZkOwIcu0YqUeykbYWaR+L0e1S/dL9891ypmBdy B41Q5JANNxH5ZNY8/arBRt+oKS22Ey3G0we/CRvbA+xiUQDcXv/JVsZ6b2AneBoP1BmM /eRAyi/ITifUYLlEkcr37szbBN3JCuBgP2GycxbYOAz3ivV5y4AM0FCzJoYLImPutnNn uFU72EVcmLrOtLP3DIljk0q2oZXK95bQv4qD9M3AxTO3ql6aeUZ03nUnoNQq6zkPY2Ku TuoQ== X-Gm-Message-State: AOJu0YxilQiiosW/lfz5hgh91nucU2fmE2XXLMPr5+7qleqY8Ol80Dpa sZSr5aUexbVTm9as9wSPEoEP2gTphfocEgPTYUDecKTENxdvVddIPEaoSaguKyEevDz4UUnnnQM rs8Y= X-Gm-Gg: ASbGnctAvTmdKrGNKTMKAchhlfpS65Bx5Vi/2MjMKnT437l+QYVw+2brGTec9kKOGka TxjBP5Nleu4Cy0bqiHyp6wmLCO0gsQo8ATBaWIzJoNszk0Rtva/Nv5KEq8o9RFhrpc8lEzXcuO8 wfVaLkSzXwhc55Mf2HmsgOuadB2T5GOwrLwvza6rFWf9Wi0JnYBTXKNz8pOOfCG54pq++HYyjuC xvuhXE8A10yW6s2R+mhUDgsDrW9b4z9ASKZMeo9NV2RhzDzMI0Z7bUTxOr5BSSppH66aZa3/Q7c xXK6r36ipq7wDCSIeyPbSe428ZTBj6J/MqiZ9JVVB2DaUtnCPVICuHskIi4z X-Received: by 2002:a05:600c:46cb:b0:436:1b96:7072 with SMTP id 5b1f17b1804b1-438913bebe7mr327719045e9.5.1737821218155; Sat, 25 Jan 2025 08:06:58 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd5082d3sm64038195e9.22.2025.01.25.08.06.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:06:57 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 13/24] target/mips: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 17:05:41 +0100 Message-ID: <20250125160552.20546-14-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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 Move has_work() from CPUClass to SysemuCPUOps and cpu_mips_hw_interrupts_enabled() to system. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/mips/internal.h | 4 ++-- target/mips/cpu.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/target/mips/internal.h b/target/mips/internal.h index 91c786cff8a..28eb28936ba 100644 --- a/target/mips/internal.h +++ b/target/mips/internal.h @@ -162,8 +162,6 @@ void cpu_mips_store_cause(CPUMIPSState *env, target_ulong val); extern const VMStateDescription vmstate_mips_cpu; -#endif /* !CONFIG_USER_ONLY */ - static inline bool cpu_mips_hw_interrupts_enabled(CPUMIPSState *env) { return (env->CP0_Status & (1 << CP0St_IE)) && @@ -206,6 +204,8 @@ static inline bool cpu_mips_hw_interrupts_pending(CPUMIPSState *env) return r; } +#endif /* !CONFIG_USER_ONLY */ + void msa_reset(CPUMIPSState *env); /* cp0_timer.c */ diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 47cd7cfdcef..0b3ac4e60a3 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -132,6 +132,7 @@ static vaddr mips_cpu_get_pc(CPUState *cs) return cpu->env.active_tc.PC; } +#if !defined(CONFIG_USER_ONLY) static bool mips_cpu_has_work(CPUState *cs) { CPUMIPSState *env = cpu_env(cs); @@ -177,6 +178,7 @@ static bool mips_cpu_has_work(CPUState *cs) } return has_work; } +#endif /* !CONFIG_USER_ONLY */ static int mips_cpu_mmu_index(CPUState *cs, bool ifunc) { @@ -534,6 +536,7 @@ static ObjectClass *mips_cpu_class_by_name(const char *cpu_model) #include "hw/core/sysemu-cpu-ops.h" static const struct SysemuCPUOps mips_sysemu_ops = { + .has_work = mips_cpu_has_work, .get_phys_page_debug = mips_cpu_get_phys_page_debug, .legacy_vmsd = &vmstate_mips_cpu, }; @@ -577,7 +580,6 @@ static void mips_cpu_class_init(ObjectClass *c, void *data) &mcc->parent_phases); cc->class_by_name = mips_cpu_class_by_name; - cc->has_work = mips_cpu_has_work; cc->mmu_index = mips_cpu_mmu_index; cc->dump_state = mips_cpu_dump_state; cc->set_pc = mips_cpu_set_pc; From patchwork Sat Jan 25 16:05:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859795 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1320845wrq; Sat, 25 Jan 2025 08:10:46 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX4b8QGsNR54v+jgKgHQZOm5Chb3HJaohf9tKvKmbCVu/Vnt4NhYskzf5AUaOSHGSVT/z/1Uw==@linaro.org X-Google-Smtp-Source: AGHT+IGNAPscrIb4QRRcH5dHthHrkyQ9kQcjraOmkHXhmjZ8z5p/gjlbDdFcjEnvyqmPnsS2yC61 X-Received: by 2002:a05:620a:2607:b0:7b6:dc0b:8ffe with SMTP id af79cd13be357-7be63252c57mr6112449485a.53.1737821445923; Sat, 25 Jan 2025 08:10:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821445; cv=none; d=google.com; s=arc-20240605; b=gaY4PFixdoSpHSLbM8fTeb5C2CawoGzSmb3Uk462B2EsLm4l8ZNx7mQoH0UqcuOmrY 0dz/HtNEqDbN3Nqg8DvAoQErMw5hnvy4/CkbsSxhmYBAWULKlgGgydQ086hIkN7bz0oj VrJVngsnJ5pvEhVhpHriZSKu42EV4nCSYUbo+VhS+zZsCMIlaLZFSEC2H9KkrlMRk115 IunvdfVZh1N3F/UCkS6iE0wg3iubPhm+3mpgMjFnQR/sPPli9Yp9u818vH51Glmwg3oh KnEpjt3LP380Lu0/vAqNrUXHcFAEhF8ce5Z23r37rzzvtOwd7HAoTfL96Qxvv8SW0iVB oxuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=XVxLloB16KKQ3LatAF3/z7GPltBurV7JlIRTNmwrSfY=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=TmskA9t1Dz+zDXK/2y3m2ziHAFqbdO4gWMNQxRm0C3+SuR1iu7UK4hvvRtf/oRJCjF K4JL21Nb8RXQKolSmqWIrxU8iDMBMPpUsobhXxP6tnSWscYOr/weEDH3WnLnra0SC4jg T84XpoOMYiog1U6BVg/Dje8I9kOdxw/QkV2160slZ2Fvc6j8UG0/b1gLKUKHaz5jDUJv Zk8sovLQ41yl6bq3bzNImau+ssTB9cjwhOEIrrwXvN+KEpjUmz0ut4vWx/YeWPh+xMiS VmwWlPs53VEbET+15lIhYNsh+k4RdgmFFMCsHQKL+hb45kSgqUXUDpTZtkl+KfJbNL5O +Vsg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qn6RA2Cz; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7be9aee1447si514242785a.258.2025.01.25.08.10.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:10:45 -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=Qn6RA2Cz; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbiiO-0006T9-1c; Sat, 25 Jan 2025 11:08:56 -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 1tbigd-0004yn-Rh for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:19 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbigb-0000mH-EH for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:06 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-435f8f29f8aso21608625e9.2 for ; Sat, 25 Jan 2025 08:07:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821223; x=1738426023; 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=XVxLloB16KKQ3LatAF3/z7GPltBurV7JlIRTNmwrSfY=; b=Qn6RA2CzLgOWX/mJZpX9lxHieJWnrfHFBAgqhHKEpUbOxfMxDtxo37WRIUDgWxDho4 4xR698cVoohRAPdpV9DN18CZ/JJjD+acrmIpzHG3pTZh9Shb28xdNg/GUInrcbbwt414 XZrEM6fJBinWB3k9m1YFhrmo93t8ZrF6rh2/4V0GmZNFmSMfEQEkwenlHkisDxh/4dLm +1XBQWXxMKT3KNx0S5I/LB0gJ+4tR7TEDm0B3lLViZFDQpJqvs4HZK4aYBF2pUeqHcz1 1wN2zNOvIivJMOqr18sDkKZHbJgiLHXCbX5XMGg2lV2ZBLOFkgOl8XTK3l1ZhF7bCe7/ 0YAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821223; x=1738426023; 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=XVxLloB16KKQ3LatAF3/z7GPltBurV7JlIRTNmwrSfY=; b=rM4XA/1QMWHdP+CxC16kE2zhfyFdchQB6yraPnrppTiS3LvR1Amf/QEGy67znbW49u pDEdpaumYa42wBvZWGKLbrybPSMwR4eGFEKmbXIZNUbB+HYxhBFz48IM5vWg120Z/Ugu 6CWi+3aI8LIMpGMiHGyzt3B7wTPnR5IuZJyVdpEzXlbP6nWvGoFWiyz1OonMu0RWzFKJ 8pbKaSa1k5nZbctkQwnSpJZ3s/U6aamdVae5HfDSq6v1xaqQSm6UCuBKaU7WltL3tsLg Q0kvgyQBIE2g+dm57Gh8Zu67m7pi4vVMWwQs2YV3yEnbFuo6YkNI4lRVMH0wpICkk32K E71A== X-Gm-Message-State: AOJu0YxLjGpi9JVqiLtJJMaqFJXobWLuIdq2QUYh+XDrLLQT9PSUqvRE 5rJLY0rTSZyKw8YY5nX1NWlyPG81O6Ah919HK/KGkfAtCnmxImT3tx3lngcNnCc5eMgdhEfqcHO DoOk= X-Gm-Gg: ASbGnctQaZAAd3IqfU6tplJrIARGBzAiBbDuniksCScxrY88YXPgE1Z/ZSmlJ3pSFnX sW+NdFJZOzxmKsBCJqX31DRL0B6hgVSVEvyf2d0gjDGq7TmpbqDpMW37QUUOim4BiU9/Z6392/p G0c3M7dQSzdJcAfKKlbf5fPfC8raCSZmUVR2T3xCionnKwfEO3Edy6D5AcG+Qth0CVY3SB4TuoA lVw8Nrjeec0LG9dAFMdkL99mB/B4D51T/LQOQllfQdwkji/ioK40efDAxwAF7GyMsAAkSe/OKlu pP+1h4+UTt9piAPEBrfXfA/olWVo72B8YmYOWNDDpJejXPvNJi2DbM3RyEo4 X-Received: by 2002:a05:600c:138a:b0:435:194:3cdf with SMTP id 5b1f17b1804b1-438914292demr315723785e9.19.1737821223566; Sat, 25 Jan 2025 08:07:03 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd4b9a1bsm64480165e9.30.2025.01.25.08.07.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:07:02 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 14/24] target/openrisc: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 17:05:42 +0100 Message-ID: <20250125160552.20546-15-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/openrisc/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index b7bab0d7abf..5d80c4aa9ac 100644 --- a/target/openrisc/cpu.c +++ b/target/openrisc/cpu.c @@ -63,11 +63,13 @@ static void openrisc_restore_state_to_opc(CPUState *cs, } } +#ifndef CONFIG_USER_ONLY static bool openrisc_cpu_has_work(CPUState *cs) { return cs->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_TIMER); } +#endif /* !CONFIG_USER_ONLY */ static int openrisc_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -228,6 +230,7 @@ static void openrisc_any_initfn(Object *obj) #include "hw/core/sysemu-cpu-ops.h" static const struct SysemuCPUOps openrisc_sysemu_ops = { + .has_work = openrisc_cpu_has_work, .get_phys_page_debug = openrisc_cpu_get_phys_page_debug, }; #endif @@ -261,7 +264,6 @@ static void openrisc_cpu_class_init(ObjectClass *oc, void *data) &occ->parent_phases); cc->class_by_name = openrisc_cpu_class_by_name; - cc->has_work = openrisc_cpu_has_work; cc->mmu_index = openrisc_cpu_mmu_index; cc->dump_state = openrisc_cpu_dump_state; cc->set_pc = openrisc_cpu_set_pc; From patchwork Sat Jan 25 16:05:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859787 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1320076wrq; Sat, 25 Jan 2025 08:08:48 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVYD5RS6jH/UlqjVcdBWOgrEfSYf1QfCHWu3LaD0tRGf5CxPJlB9HZDjHKaes1oSxMHhD+1sw==@linaro.org X-Google-Smtp-Source: AGHT+IFSDAY9UFSzTIf/dxfCWXjr+Bbkl7zxUzwgHboezN2yMqdp4h+b2OtML1wOXCwZAjW9PZb7 X-Received: by 2002:a05:6102:5043:b0:4b2:48ef:3cf2 with SMTP id ada2fe7eead31-4b690cf3a1dmr29938503137.25.1737821328433; Sat, 25 Jan 2025 08:08:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821328; cv=none; d=google.com; s=arc-20240605; b=XdtVb4XN7WUUDnFgEfuTiw+E6riLVjwChrQGj2j6cJMlO9lWTALNKGSds9zpLRJEIi AeofhU1ixekMur0dTENZmvCQXkfmkgxZIvpw40DkubpXkrluNbP8L7ZJIMjrz0f1I/Pl 9k0dH3Gaph1K99wFcaZ345aolWreSkvDXHVrbRD6kVUEzVxUiCv44a8NMh9YS72skn5V RiUzp23anBmuMYotQkp33DOFyJ/UF/IKGAC8h6S4FvRpuvJr5LeGjDpjd5XOHg7T2RzY vS1qE4mHhQIR7ykz4DX+JPSsK1t+BR/m642yCJ25Xb1Pxlo6ZFuNlKSpFIvFIb9elwPI cSXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=ZVfXoDh+6S/jYxx141Eb2tmPZau06sCtOP0dQkqathI=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=VxXCquqhZYRJYjvtOWZknskomOGXP+JUpyAljIzuWhqpGOttoUbi9t0rZVBVod+vvu nIwok8dZrelNGnMufiLvY1K2xNc4vzoGIn6gFWVkEm/4vvsKGa68/7/Pa8vDdi+o6KBQ 4AyuX4/4aX8AvTyEDV1LQqwci+cioi8wppOwJVJ/R6kvFWJLcdZqtfBRtNXH6Pm0HLvC gdUq09gEEo+xp5jQMIiZCIOmjZiLi1mQ4fZr5txJ+YLv068GvfbjUWUxFW8+piWceYPq kJxCdBF2cQ2tTwz3EM53l+Pkib8zdQ17oWICM6QlXrkrE8UlhYib00oVdEH6sBTHYO6D CTLQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rgHzBP+3; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTP id ada2fe7eead31-4b709a00dc3si1391921137.571.2025.01.25.08.08.48 for ; Sat, 25 Jan 2025 08:08:48 -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=rgHzBP+3; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbihH-0005L0-9r; Sat, 25 Jan 2025 11:07:55 -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 1tbigl-0004zO-9b for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:20 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbigh-0000ma-TT for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:13 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-38a88ba968aso3029339f8f.3 for ; Sat, 25 Jan 2025 08:07:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821228; x=1738426028; 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=ZVfXoDh+6S/jYxx141Eb2tmPZau06sCtOP0dQkqathI=; b=rgHzBP+37M63r+F4shB89gvD05ayW14E3gFACR6eVzW3RmgbrnQy8UBL1+S01Umwm3 X2hUAkGT+wLogQ4eCK4UgjlHgrZ1e9L0ttesMR0bmoBRU3XpbuWGrE/PsjYxPhNLOMaF 5T9RZKNVMm+Hyqz6hJtsRiY1zbfojaI3j6AwNQv883Q1anURvZ5oMWsaptj7f08IA8Ln FXSTnv1cZdZhzv76gM1bTsAhTXOX8Mm/m+RXUqPqx8fLgCfKTkbypYeoA/dn6+Zuy8zZ aSK5CrzSfxTpyR0JJTk1UoaacvHGNQE7crA1PPd+WswTVYJek1kQayuVwkIsSCLJIdkc 7+GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821228; x=1738426028; 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=ZVfXoDh+6S/jYxx141Eb2tmPZau06sCtOP0dQkqathI=; b=fieCMNWX1ts3fyxTwYHGtuPFj6XLuDePCZOL91x2y9PCwEbyUN7QWvSwY2bm3ueI+D NJlyn+uH/e6wiFWU/2LBgTTSp1+zrvXmrM3b8i80+sThfWRaRRxeCW3jqE9Xg5T8tHdo e1X6PRITWChru9PmLgNTCKoOYmkSQvCHz0XfcZK2WlnRkuj0jB2wnWfmKBv/J9ZBNGN1 UfGSmq6sVoVPU3ikRg9PkF7kOdztk1cjr1S5/+Hmj5N7uzn17ykHNWBJPf4vwYRD9sKz UQsewzjnnKQULEri0QUWes1Eyw/cgl5ge1uFtBsBjIq1dGX8E6ldzCg0enrNTz8swylG T/jg== X-Gm-Message-State: AOJu0Yz0bN+xyiaL3boS3iy6zfXMSXC9iv6YBb8J3gnPyf2xmn7YatSp S1D0FBUI9B1RzXgWf+1ecPOVP2OZZsV3MR577BRsZ3evLA2iR8poMWSJ5jbq7iPg9byblHQZ2Eu TEkA= X-Gm-Gg: ASbGncsaetFCFv+jEVqHunqwD4yP1YHG2lqR6sudl7bIdDD8L/q0UjLJ7JMYYiK3zML ft+JY410t9hFTdwdrD5UrlsRZwl/DCXL9WwYZJ4tOsaIy+Fps1LirowNYj41BuhswFHXsapCxB9 uv2Fqu0dKGG6SbOB9ejcqoWgAUk0tCWDmV24l4+BBricqJouErBwfR4F7UMNEF6iarjREyE5+iH s5fgWR+csN/BCf74ujdzed1c+yB+YAbzVXlqvz6x8sRTqBpBKY7mOOxRhFJDspIZhlcWlfpwrOo KJRq0q9nweQTdTm2iDZxXO3EUaWaoEtLqcIBm/2gbMgkMIp6PgYvA92BTP4u X-Received: by 2002:a5d:59ab:0:b0:386:605:77e with SMTP id ffacd0b85a97d-38bf57beaebmr36094501f8f.49.1737821228273; Sat, 25 Jan 2025 08:07:08 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c2a1c42b4sm5952252f8f.99.2025.01.25.08.07.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:07:07 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 15/24] target/ppc: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 17:05:43 +0100 Message-ID: <20250125160552.20546-16-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/ppc/cpu_init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index c05c2dc42dc..081fb5bd343 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7177,10 +7177,12 @@ static void ppc_restore_state_to_opc(CPUState *cs, } #endif /* CONFIG_TCG */ +#ifndef CONFIG_USER_ONLY static bool ppc_cpu_has_work(CPUState *cs) { return cs->interrupt_request & CPU_INTERRUPT_HARD; } +#endif /* !CONFIG_USER_ONLY */ static int ppc_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -7418,6 +7420,7 @@ static void ppc_disas_set_info(CPUState *cs, disassemble_info *info) #include "hw/core/sysemu-cpu-ops.h" static const struct SysemuCPUOps ppc_sysemu_ops = { + .has_work = ppc_cpu_has_work, .get_phys_page_debug = ppc_cpu_get_phys_page_debug, .write_elf32_note = ppc32_cpu_write_elf32_note, .write_elf64_note = ppc64_cpu_write_elf64_note, @@ -7469,7 +7472,6 @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data) &pcc->parent_phases); cc->class_by_name = ppc_cpu_class_by_name; - cc->has_work = ppc_cpu_has_work; cc->mmu_index = ppc_cpu_mmu_index; cc->dump_state = ppc_cpu_dump_state; cc->set_pc = ppc_cpu_set_pc; From patchwork Sat Jan 25 16:05:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859803 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1322013wrq; Sat, 25 Jan 2025 08:13:46 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUmMwhzLo9VURFioZbBuM0AsXwUxq1jH2YPnpLbZ7v1nB/p51YpM/lKuk+n3+38CBE0yJSifw==@linaro.org X-Google-Smtp-Source: AGHT+IEqzkqMoJNFsVa77edeC//PN2trNyG6mW9NZ4U670T3de7tSysy5OeymWU7ydFIrlrzuZst X-Received: by 2002:a05:620a:2607:b0:7b6:dc0b:8ffe with SMTP id af79cd13be357-7be63252c57mr6114096985a.53.1737821625993; Sat, 25 Jan 2025 08:13:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821625; cv=none; d=google.com; s=arc-20240605; b=b6tEwNWW2IYoodXBSV+RS+x2A/4wBs8/Z6YN+XVzOyfvG4BjqrFIFpGKlezW0oBz+w MLYIlxBKJoS/gjzfs1fmRs6D4w62HnOfI4sWflWlxW4agPqFwObKM6+fZHoJRSXT0gKn f1mh6mIEK9I0KahN3vHt/fDG0U5V0t3ctLIPC9OHxmLiQvQFjqO9ErF/AIrQYBmngIi6 cqze32tiJdA4J8S/YEJtpA8fW7NXECTEYf3sBODXVNgjwgw3Gc+79Y8/YDayUsO5oVc8 zeNGGAlcAYa8WCM/J0PfI+TmDiZaRgXoldo6Bsc+NCuXyk06/Cf0ruz1jo3BAtSXZo+k zssA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=HrE30xT1EmuXt0tg0kaHmGrX7iIi1CpOMZL7K4RG6J8=; fh=sPSIgLefVAArq1pIn4sEhNn3TCqsD04EFr+3FlApQWQ=; b=k8n+9BArgHt12k6YrrZZ+BSBz9gibvmpEOrmsKfjWlUebftYpk7ZlvfJ1YmiC9t0Em wNfRl9vzd/S7LW6wSY5mTVwx7b5Mav5u4B7isth9gNgIlgIMzFOKEmRvxoSP2z7Vp5q3 Rgbe5f6E3qNbDulTG0n7+ev96GQt89N3NM8yYoVaFqsS3/UAVTBWWl1E0avfcj4lgYiB wH3r9tvqeCDqCBaKrVWACnem0/53c53/K++ma33aVaiK5SxnDMtsOPyJXYEasfH2hl2R HUh3pjgPJ8LMIBAlofhFpHkEka+W5hHjrifBp9+jCc1G9qYPCAwgEDv5/ykKoQGpHu8j 7hyQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KDSjV8K3; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7be9af117bfsi588328585a.502.2025.01.25.08.13.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:13:45 -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=KDSjV8K3; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbihT-0005V9-I1; Sat, 25 Jan 2025 11:08: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 1tbigo-0004zp-Ct for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:22 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbigl-0000mr-25 for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:18 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-385d7f19f20so1576072f8f.1 for ; Sat, 25 Jan 2025 08:07:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821233; x=1738426033; 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=HrE30xT1EmuXt0tg0kaHmGrX7iIi1CpOMZL7K4RG6J8=; b=KDSjV8K3x+ZucaXuRw5Cb3C07VOUJ1/+FQnCyEyib3y+QPyaBvazHZxKuPErI9BgEC RsucQVM2/OtJbqwhMz+Ka8ckIvh/WKzHnJ7euxefusiEMwJPeFkcMvfq6mej8MDyEzFk l63SKDsI9oJEMcLfSk0bu0lN7rLtGh7Fc3JhFe+VfNzWc/jUlO5DKN8UvULgrgOop2PV AHn3OtMuXfT7asNtYwvYE2ZyZq8slj/0Kr84Kc5Mh0SwScAnIgdY4kNXS+B0b7zOFwjL oxXwzKrHgrLr5MPOktZ2EbAOK6ZtLBRarrNx/MuP1B6TWmO51NQYTi0R2PSsw6kWI3Rb ZR2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821233; x=1738426033; 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=HrE30xT1EmuXt0tg0kaHmGrX7iIi1CpOMZL7K4RG6J8=; b=sZSN7AVIbR+dobLKZGfBVhYO0WoJtugoDIlw2sFCW6psjd2uZ7yk3bfOx4wiiX3oxU mj2tI7M1fdj7lNTd0evK2FCI1G+0+paUAkSFEZVFmdfeBgT4+J6t/x+7WRMzK5p34J1p YmRDCSLcCc2V6hz01GkkHfo6xaHHTGq2DBraGFbSnMjPHU+lsZr6xK6voJsRxKiKdFBe Fycb1AJOb9MNejOW7OmNMqSqjDkSEKEN1WS1LCtbjP818wnfgC0GIs7/NNDYEdm0ztfZ IELEVkrHs/tQiIqagqB990UTt2xkxeBLLUCLYcI8+umLuDnd3mFMua905xD5K5qG0cQ2 VIew== X-Gm-Message-State: AOJu0YwSsdbWJNdrxM4vpUs43yYV3nCCWUAaiwhOkFXTjmR7zqop5r7w FmM0OEUO3cJqYxBQq+EBVltu/eSPa4Pz1IYYVrbjidkEk+yCRgh3OIx6SybXBVe47uh8n+2tPV0 NqQM= X-Gm-Gg: ASbGncuGhezYiHQYJAxlKCNqGRdlXUZxw+dH/GjshVFbRldxO8cQAMwKqWbRZdi0Uv2 n7HIU6kxkkrlCFS7FdYxNFSZZ+r1DWgVGzSaeK1dC+7rx/6AgaFL5tHasMwpMn3/MOd5pCMqdbP p8z4y3yToCtBSUUZRU/7GeHIN1XwlV6qaiyucSE5PIio7s2SnHC3eofUvBFEI2/R3HeQ3aHY2NR PdhcX3EJzpW8oQHQWoZ6fmWIp/2ntsJm+WwJgbF/Dm8QuP7TKVz9dJ4ljUj1IlEcl0phHytud5J SYZLPL+tzzT6taoQZd5Ns/C2tlJaZ1XgOksZfSP4I6ECNtelYgxgTfH2eQmK X-Received: by 2002:adf:cc90:0:b0:38a:4b8a:e47d with SMTP id ffacd0b85a97d-38bf5674f99mr24452337f8f.26.1737821232905; Sat, 25 Jan 2025 08:07:12 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c2a1bb02dsm5896988f8f.70.2025.01.25.08.07.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:07:12 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , qemu-riscv@nongnu.org Subject: [PATCH v2 16/24] target/riscv: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 17:05:44 +0100 Message-ID: <20250125160552.20546-17-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- Cc: qemu-riscv@nongnu.org --- target/riscv/internals.h | 4 +++- target/riscv/cpu.c | 8 +++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/riscv/internals.h b/target/riscv/internals.h index 67291933f84..213aff31d85 100644 --- a/target/riscv/internals.h +++ b/target/riscv/internals.h @@ -142,8 +142,10 @@ static inline float16 check_nanbox_h(CPURISCVState *env, uint64_t f) } } -/* Our implementation of CPUClass::has_work */ +#ifndef CONFIG_USER_ONLY +/* Our implementation of SysemuCPUOps::has_work */ bool riscv_cpu_has_work(CPUState *cs); +#endif /* Zjpm addr masking routine */ static inline target_ulong adjust_addr_body(CPURISCVState *env, diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 3d4bd157d2c..4a7e02d9a99 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -1010,9 +1010,9 @@ static vaddr riscv_cpu_get_pc(CPUState *cs) return env->pc; } +#ifndef CONFIG_USER_ONLY bool riscv_cpu_has_work(CPUState *cs) { -#ifndef CONFIG_USER_ONLY RISCVCPU *cpu = RISCV_CPU(cs); CPURISCVState *env = &cpu->env; /* @@ -1022,10 +1022,8 @@ bool riscv_cpu_has_work(CPUState *cs) return riscv_cpu_all_pending(env) != 0 || riscv_cpu_sirq_pending(env) != RISCV_EXCP_NONE || riscv_cpu_vsirq_pending(env) != RISCV_EXCP_NONE; -#else - return true; -#endif } +#endif /* !CONFIG_USER_ONLY */ static int riscv_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -2912,6 +2910,7 @@ static int64_t riscv_get_arch_id(CPUState *cs) #include "hw/core/sysemu-cpu-ops.h" static const struct SysemuCPUOps riscv_sysemu_ops = { + .has_work = riscv_cpu_has_work, .get_phys_page_debug = riscv_cpu_get_phys_page_debug, .write_elf64_note = riscv_cpu_write_elf64_note, .write_elf32_note = riscv_cpu_write_elf32_note, @@ -2933,7 +2932,6 @@ static void riscv_cpu_common_class_init(ObjectClass *c, void *data) &mcc->parent_phases); cc->class_by_name = riscv_cpu_class_by_name; - cc->has_work = riscv_cpu_has_work; cc->mmu_index = riscv_cpu_mmu_index; cc->dump_state = riscv_cpu_dump_state; cc->set_pc = riscv_cpu_set_pc; From patchwork Sat Jan 25 16:05:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859802 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1322011wrq; Sat, 25 Jan 2025 08:13:46 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXOgJ5f5lZKLGtVOrZKdBaff8AbWytEfvMzHH3Lf09JyeFP9iO13VURcJ9KWEyF591d2oD17Q==@linaro.org X-Google-Smtp-Source: AGHT+IE8otCEVDyMdvvbXr+z6WDDbGdzyiXnLFs8TwXSmd02hrsuZqv3F3lfl9ig2uzPaVyabyDG X-Received: by 2002:a05:6102:a47:b0:4b6:1ce1:30a4 with SMTP id ada2fe7eead31-4b690d1233fmr28003801137.21.1737821626057; Sat, 25 Jan 2025 08:13:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821626; cv=none; d=google.com; s=arc-20240605; b=avMClQlFwObYJm8puRWXKouuzoH1PBg3ygzXbvRDHyUKvqfe8jyNXC8BPeMUJsRPEp kervvz6dy9WEM8UwWvF+zxWj3nlNvqpO+MhflDkDvJODadYJZFCbeH6bduiUOEqgWvwa L7t398WGR/auFFnuEdfn5K4egVXJB2VabhK5dTxarAu6Hb6LtP9T1Kz9kAjKgiVYpO7R EEC4XIRPOYby7waTEvNwhxfd13NIsvSDhe4DIZwPwazdFkTTiMeNv8MHRvhv4vKb3/7z EjONIzoXPKKMqxzjW1OwUaz+ACuL8Xwc6cU4w3+jRGlFGoAXIlTYCCki37OIOB8iWppe YnxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=jJ0qtgTntar3QVC5dx8kSZPa0KtS/nd9q7NwrkDQJ3Y=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=Lmqjbhst4tp542Ks6fgJP2GW1NLXqWwVi8gF7iOAGDMikcpbAwQNMoW34mSGlEKH5A tSg9VX/61b90yeQpcaZ2PqQojURmuZfvLyHQ5VKpwTP2muGXzBQNDELCUfD33izud26i U4BPK1M+54kTU+dVqeQ/oBohcuE94lqAwmIskir0qDBwCwi3qsx+AEd4H2Je/ANLW3Ok gR81F0To/3hFCyvqq9cWYXg0BN7ixEGDcaSE99iVpMQCzsGmmiEDLWgdNYOoRNTJufcM iKzjS9dsoeSwlBFnTEtvDXXc3M8mORx+1BWib8l2EbhRyFuHnHojBAhYQSsxRI2Kfn94 XSHA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=atzhW1vH; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4b70975860esi1458226137.66.2025.01.25.08.13.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:13:46 -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=atzhW1vH; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbiid-00079B-II; Sat, 25 Jan 2025 11:09:11 -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 1tbigr-00056T-Hh for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:29 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbigp-0000na-Vf for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:21 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-385eed29d17so1625793f8f.0 for ; Sat, 25 Jan 2025 08:07:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821237; x=1738426037; 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=jJ0qtgTntar3QVC5dx8kSZPa0KtS/nd9q7NwrkDQJ3Y=; b=atzhW1vH19stUIwc7Q2FdITCTNois8GFoblgsX4g72LrYo32to0SffWP6fZK42Pxcf S+wCG2LPNAAEUyKcfyfTw9Y6IZvKIvR/Q6S2TaCofji5iZUvrDj22/BOpc7lC6ST9pLq RD6JQm9nsc1sVI6nkmaPnj+HCEyCWJy3d4N16kVb25I4EVbtTt6H2RKblXIYvdotAnmB DVzlh9jTDtFIfQzjWJStom/cUFS3qmIpOkL1U153eNXk1mSsC2eU37TOS1x0Lq8K6UYa 0NHrYsrTN8KvFI+b59+5Cj6HXOw8/cBN8m5zrI3fl2ib8tmzIEm5oMNu1zG/jMBDJUp3 +ixA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821237; x=1738426037; 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=jJ0qtgTntar3QVC5dx8kSZPa0KtS/nd9q7NwrkDQJ3Y=; b=CVJTw6O3Pdkkm8kAr3LkoIeV1Gr9HCongsjQU6tsWAmAKc8t8uoTQFniyxbTZTQB3s WLOzHgSJddDjD8VakZhoHbDdh3jYjFEs4i22ruha6e8/VDPwnXB7PCCyhKnG/Lw08PkK dbBqUr4f9470edsxKSqfBDwpwlbUGUGvi5asQ20dCl8FbjyNYt9ME8Bc+KNUFvsEEHtR ejw0t0QJ60n+XOnHIbBS4Vj4WoefZjGzZz5oTfdcMLHvlDA6pssBn2OeCaSFjyK408KR ndNO4byiBqHKeJJurrGklprP3yrKn0dDyBLXdlEjhQg9rrbrqTfmGYUWsYRN/Ob1OCFo hxsQ== X-Gm-Message-State: AOJu0YzqrwlD8b5PsUGNnE+WmVSY5QMDYtFNXkN2gAFslzOsO7r/wj2X lS5vOV74wjvO/2Xrn9c0rQqQeVrtcviCM1DDA8zAncSfcgouZN+e/ykmy1o62EZ2YxHt4R9cu3O S/b8= X-Gm-Gg: ASbGncte7G3tWJ2uXBEbMVLqZ3jK/8BNyo2FsTqfXykPtySJAdPvi0t6AY3jLV6Rklf MmQwvQdLwK19s964nHbIEEC7wm2DVn8H3Ild/or/P3Q6Vuum7JoI3/mMS38CRkPkreLNX7eRU/B tVSGeIWn4bCli95qBcdNqemIdHPDPSGu8gnhTSxtR8oQMGyawnifEVBBS1qvHb0gdJ1uXC/bmFy 755m27hP7yKwhzDjmigti+hK4mZat/WPT0BmGMLYHhprWvzh96shQd9IJl1RjgM7FUqOELUXCX5 F523TdjjIgzOx3Cayqadx0Xs0IlQVH997pvwVgp4TKA7BtoS16KirgBqwWs2 X-Received: by 2002:a05:6000:154b:b0:38a:8888:c0ef with SMTP id ffacd0b85a97d-38bf57be3ffmr30005007f8f.52.1737821237509; Sat, 25 Jan 2025 08:07:17 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c2a17d6e2sm5858221f8f.23.2025.01.25.08.07.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:07:17 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 17/24] target/rx: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 17:05:45 +0100 Message-ID: <20250125160552.20546-18-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/rx/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/rx/cpu.c b/target/rx/cpu.c index aa310bd6144..79b95090e7a 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -187,6 +187,7 @@ static void rx_cpu_init(Object *obj) #include "hw/core/sysemu-cpu-ops.h" static const struct SysemuCPUOps rx_sysemu_ops = { + .has_work = rx_cpu_has_work, .get_phys_page_debug = rx_cpu_get_phys_page_debug, }; @@ -217,7 +218,6 @@ static void rx_cpu_class_init(ObjectClass *klass, void *data) &rcc->parent_phases); cc->class_by_name = rx_cpu_class_by_name; - cc->has_work = rx_cpu_has_work; cc->mmu_index = riscv_cpu_mmu_index; cc->dump_state = rx_cpu_dump_state; cc->set_pc = rx_cpu_set_pc; From patchwork Sat Jan 25 16:05:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859794 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1320779wrq; Sat, 25 Jan 2025 08:10:36 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVapgnIQOtPKaj1hBJCf12zZK6fhuxp6LNtkowfGuJ/srr20xWljt7J0CRd/W6167Fc7IgnVQ==@linaro.org X-Google-Smtp-Source: AGHT+IFl5JdjSWwm++P7qsAH1IuxwHNnkZOJcpSgrmAKL3xu4P5E7zTCbzPkklwxR4Ut2oyoKjuX X-Received: by 2002:a05:620a:191f:b0:7b6:d9df:d53 with SMTP id af79cd13be357-7be6324fc27mr5321337085a.37.1737821436169; Sat, 25 Jan 2025 08:10:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821436; cv=none; d=google.com; s=arc-20240605; b=hH0wvmG1JG29ZM0FPdMO0miPA/OIkKR4blAzyGGdnrlm4G058kxNErTDYSx/r1E/+q YqdRO/26p/6M8cl7W9xX14dFMMp2cg5cAKJ96dUq0eR2Xzgl88j8wRhC5Z+w4RHXYsEE gu3HT0lMW2W+c3felyX8QEyhfKmHM/E2LMreMKtcwTVb5hgYxI3/7TT4BA9n9Fcv8leW vkMMbEqooGXCxHl7ra69FJIz0ak09Y5g5j+l+E4lFtfhP9fSaxJAFWY7hd9LWJr7JREJ BHxwCfprX9MMCbp+MDzDrUJzNQ6NlgTd24mU7gJDVeojjn9t9HxXDWITb75zJBUT4VJ9 vWhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=WDsGnhplkgqT/f4agy456szrFVjRVVohKrpBFsRKCFM=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=QOLnJR8f0coGOOtVtmramhAbui+4/Qd/0tznyAi2xJLxWvvdahpMSg0y7orf/DBCGy /7Y8hMckp7dJAlDwKtjXVeicwApFbMxBaYvMmqoAe9MXniGV06EjHdyAgdd2m65Shrhc cdLwhaAvS+FIB9/IVHo3Fjf0zVrcT847MJ+PY0OilAgAAHz/Ssd8RCoJeri4ikP9xjyP +awI4GFdQ7nCyqlDsiIs+hLDC+UOV1UqI6xJYhmsVLY+1p4k0wPIzsuNaSTZJ3bSEW0G n3VK4+oKxAT8lwReQRYsXFYoyvLQfKPSQWC8anbz/4MSHk0+vupejgNogpehN3z+4Fc4 HKfg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xCLG7wXN; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7be9ae81965si509883885a.93.2025.01.25.08.10.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:10:36 -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=xCLG7wXN; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbiiT-0006Xn-V9; Sat, 25 Jan 2025 11:09: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 1tbih3-0005Ar-MD for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:36 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbigx-0000o1-NP for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:33 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-38a88ba968aso3029461f8f.3 for ; Sat, 25 Jan 2025 08:07:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821242; x=1738426042; 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=WDsGnhplkgqT/f4agy456szrFVjRVVohKrpBFsRKCFM=; b=xCLG7wXNIxaAcdV4oUHmSbZE/aqhyt9/vHldPn3M9Wz+yvd+4f9shn9CcdMPRvNbhk +W9NT2SUjj6Z6Hz5ItCeHeC74SIpxZDTJLpfmwL3XqcrhK9naO4jZ9A5QtJI/Tav4hPb zF1/CXG56Na49s90dfeW2QSdPx7+H7ckXAWV7Qjry4CqJqQ32MWVMdY/7j6ZEBaeJ0bP KTLttgMtJl9X8N7zm4zqaQ+/9fBrnkHzFOO5zpfayNml09RldGPgdt8csVGUBb7992AY e4CqH/DPBaio/SokAMPWsC895q6SoPT7JVoEtfFgcgR1fUFaddnTv0sSqlTJq1p6VbvD X4iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821242; x=1738426042; 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=WDsGnhplkgqT/f4agy456szrFVjRVVohKrpBFsRKCFM=; b=bBMkCe4UXqOZCYyMjrA0FPboKq/zV5rSbam/PL4DWQJ52JocV0cVuEcw9RAdPCfB3C Ox+VbDy+UCv+mJICa+G1Ehu356VyW+BaSIrNZJ5ixK0PNDcnc0wro5F/vkbMcJA7wM65 LILwqzExSYtgQvpDY/nOcsbbKkwOI9Do0fXg6htggNGDC8lXa2IJuTQQJhj+cO4rQXhn t7uEKKqiB4is0VrLpNOijhem7nMk102+z/ZWvc560+KQD4unZjxxrbpHdp+O7X35UTSm M0t/3WHb2PXgkN7UwiQlffamx1jDXDOUoZ1DRNBQvONiVTYUZuQCx18D8tlXxft7juWi Sxfw== X-Gm-Message-State: AOJu0Yy9RTHfB0VR/RBURU6w6D3Dyoor7DLlposnMoqgHGyEqcy8mZiH YAkiwP5KK7A0LQkdGeSblOoSJCTKb8Rb5+icMZbYfBkzLnTcBpCcg8IbIpdQpVfiqQq9LOldbvm d4yc= X-Gm-Gg: ASbGncteRNB8fqnpooQMrXw13G5/Cy/wZRNx9g/twtqxsiElY0rpDJ02T/LiJKdk2Tf dPn/SgYYjXLvkTys0rn6gAsPpy+ArxK4fGdUIvoE0RWIBUBFEVRVEWH0Yt7CUGciRemZBlW7ne/ FFgeHOGVO6ScNYY0Zdf6BdVR1yTY8xDCsWwHh5ecN+0kECTm03TwzNtBjxvh7Fcj1Ex/WiACWQC a+5KrlkYIg+6D3KJE+3HgXzwmJaE35UUXzXgl4iYUobr5ZztiEqqI1u4iIoGfAqfXsvJrQFloBC rrP0GFSxBYKi/MuBOV8kml36KgNYQtS6EYhwuNpj/LuZit+1AtdUwNCojqkV X-Received: by 2002:a5d:648a:0:b0:385:fb8d:865b with SMTP id ffacd0b85a97d-38bf57be4a2mr37116557f8f.48.1737821242172; Sat, 25 Jan 2025 08:07:22 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c2a1c3f5dsm6030927f8f.92.2025.01.25.08.07.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:07:21 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 18/24] target/s390x: Restrict I/O handler installers to system emulation Date: Sat, 25 Jan 2025 17:05:46 +0100 Message-ID: <20250125160552.20546-19-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/s390x/s390x-internal.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h index a750e7a343a..6e2c98de97a 100644 --- a/target/s390x/s390x-internal.h +++ b/target/s390x/s390x-internal.h @@ -356,6 +356,7 @@ void cpu_inject_stop(S390CPU *cpu); /* ioinst.c */ +#ifndef CONFIG_USER_ONLY void ioinst_handle_xsch(S390CPU *cpu, uint64_t reg1, uintptr_t ra); void ioinst_handle_csch(S390CPU *cpu, uint64_t reg1, uintptr_t ra); void ioinst_handle_hsch(S390CPU *cpu, uint64_t reg1, uintptr_t ra); @@ -373,6 +374,7 @@ void ioinst_handle_schm(S390CPU *cpu, uint64_t reg1, uint64_t reg2, void ioinst_handle_rsch(S390CPU *cpu, uint64_t reg1, uintptr_t ra); void ioinst_handle_rchp(S390CPU *cpu, uint64_t reg1, uintptr_t ra); void ioinst_handle_sal(S390CPU *cpu, uint64_t reg1, uintptr_t ra); +#endif /* CONFIG_USER_ONLY */ /* mem_helper.c */ From patchwork Sat Jan 25 16:05:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859792 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1320680wrq; Sat, 25 Jan 2025 08:10:21 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWBtZ7eVvj4kSYUMmrF5SnkHKIQi59WxPzsmNK19SOyi0ho2Ni7QlmxyShaLvz9kcQcRpeAPA==@linaro.org X-Google-Smtp-Source: AGHT+IG/29IhsckDOEiMBUSkHkmS+9fxckPqYYPkOqyzGxHz8HhdNwyQT5IIpTym67aDih1wpncs X-Received: by 2002:a05:622a:1993:b0:467:7513:3d8 with SMTP id d75a77b69052e-46e12a46083mr509950611cf.21.1737821421706; Sat, 25 Jan 2025 08:10:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821421; cv=none; d=google.com; s=arc-20240605; b=cArcKFVJrPo9fTY38jnf00oSCgw5SBYbd4ASvOS+jkw18DZ4KoOMLDyMOk22ffGLw/ nRKrpsfuK8nja3294dFu4Eh1lxpQq+oRLkH4ob61hyIVpnGesfuczt8WJf3jX68XgKLO KfiytUXPEuAPg03QdePANIzRXvu5ydUyG0n2dkmFUS02zhS1A2m75PXBHQoG9aDooL1Q lGSolXn8ItugkS+x9IXAdsOd/xn8CcAhXdPm5v98WQwU00au9Ag2ozFmKzidhE+D1273 g26jev+BC4R800Y6G2jdlbAXAphqtjSS5bSD/G52Y2YWwwLUCjM+6cq2qKm5pFTeLt4S Acgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=uvyBSQXbzbGPZHAiCl001qEBhi2s4blv2wiDqu84MNg=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=apDYHvHqdEsPsenwffsoZfdDCeLOB/ObAQwoYXUSPXqKBXz5a62PC6jxAx1EQ5pKq2 i9+5yTm0G4+/Y/9+4lYlcqYYOAF2nV7CwElAs7U5Sb8Mj/VvdOwktgY6GZOM313d/aCI pyuOyVejZ4NkDxHKeNL64PXOKxXNADJV9lg0gNSAVLdCq76Q3LJ4rxMmz7oH/w4DP6wy UdAndY8YXWSokUu/fTP43KICgr2bTICVYI2aPMiUOjSce+Aoa4iWUenf5Lt49lDNAU4b nXOI063rWgh2PaYmIMhX62OoXktanDU55nu1oDdGDmhYYeKIxXV1rkp8FQXaVkaq42Vt IxCQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QAiWdEmE; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46e66b69062si48639101cf.229.2025.01.25.08.10.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:10:21 -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=QAiWdEmE; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbiib-00076l-HG; Sat, 25 Jan 2025 11:09:09 -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 1tbih4-0005B4-P7 for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:38 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbih1-0000oN-Uk for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:34 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-38634c35129so2771233f8f.3 for ; Sat, 25 Jan 2025 08:07:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821247; x=1738426047; 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=uvyBSQXbzbGPZHAiCl001qEBhi2s4blv2wiDqu84MNg=; b=QAiWdEmEI6T2fjhMShEMOkvl3HoL7+Mkc0bGhgcroxRXWWtmNY2SO2SDFQ/913gVzM 71xE4crFl2dNAIzVM49WkTeh6IyRtSYi1XfMsjEBrRjnnN+hYrQNRLh2qjOG3LCwEiR3 g9gtZvaxPSA3ao5+Jww/bpxCrHopK2Jxy/b4iNeMNB+W+5zPm4HUQnv3JauO/712q0SX xuMxwgBHbP6WXhNJRSGSPmwRlDuIA/MHhM7gkpZcPPSSKOIVT57TM/OqAV9ufJEZHkcF Id06py8raLO2VqPdil9Z7eZP5iM1eVmFMYUmB4U6Z2KZCg2bgk/c6A5HJHgPpqn7TWBs c+vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821247; x=1738426047; 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=uvyBSQXbzbGPZHAiCl001qEBhi2s4blv2wiDqu84MNg=; b=vZcox9lRR1UHLVJkMaM3IJSTbr+kg0JDaYSh/Flykd/ECWfshXg0qXeIA29A1EN0oy FDrhD6F+NTxrPqJy+uHlmbdCz9HtAZ3cM9yhV9kbl04QrjZMQGr5WeyG71pIeL5LBzo7 muEdNXe4wtLWqOr7XrzxOvhEQbDmcpfbqkI7PuNmp70rcKqOG+xoSNKsUmCA38jK1gz7 YLEJlETjPhCMRnrASAcXss0+zGZRQH2aWq1R84/zS5zBkaLXDO7+5mMHnbns1Djq3NSG CxFjfrwJtHtFm4wIvJz7x+qRLXIVXAuLXRR8KBLDKzVUNXxcSnG8QP5gGe2MGWSE6pYp 0qwg== X-Gm-Message-State: AOJu0YzzNLKnypm170es4YrjD0e7oJx0XzsVCHs+LUaWNXYTK1uGoi6g iTSAJgCzC9WoQ3DTfa4x5AaUlLbjzdpa/qc9I0MFiycfKy715ASb6Sc8L8yjtenZPTd02dELviE Q6BE= X-Gm-Gg: ASbGnct8w8U8dgrmpJgwsJ0ZNpAC1/X4byfQpZw4md1isli9wwkS2BpXeIaM5vaqqJd T8/q+uaGlNmJaA5ElOIuo9w1Dc1SjtXrsIoT4Axcs97RBnF4qnzsLMYOP+EjNB+glWr0ls2HQ6X QXSg79pFx0/CyrY/JdHcfvW29JRThYLjo23RgebcKc9XxELkBFvXCOO9KWwcDPMallkGuHyXxCU Sc2LsJfklpiLxikq8OVeTSkJq+ptQ3zqJe+2/39ni0LmlCPscdUDER/+DjdJXX/8bdjHh7+S/bE tvjTjMbMVOl0jokBskTyu1xGOZDpXVgZLnhKWT9DaW2kOleKhDF+v9bV3jBL X-Received: by 2002:a05:6000:188c:b0:38a:8d32:2741 with SMTP id ffacd0b85a97d-38bf5784a95mr29584300f8f.19.1737821246761; Sat, 25 Jan 2025 08:07:26 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c2a188fd0sm6060157f8f.58.2025.01.25.08.07.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:07:26 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 19/24] target/s390x: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 17:05:47 +0100 Message-ID: <20250125160552.20546-20-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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 Move has_work() from CPUClass to SysemuCPUOps, move s390_cpu_has_work() to cpu-system.c so it is only build for system emulation binaries, restrict functions not used anymore on user emulation in interrupt.c. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/s390x/s390x-internal.h | 3 +++ target/s390x/cpu-system.c | 18 ++++++++++++++++++ target/s390x/cpu.c | 18 ------------------ target/s390x/interrupt.c | 8 ++------ 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h index 6e2c98de97a..a4ba6227ab4 100644 --- a/target/s390x/s390x-internal.h +++ b/target/s390x/s390x-internal.h @@ -245,6 +245,7 @@ bool s390_cpu_system_realize(DeviceState *dev, Error **errp); void s390_cpu_finalize(Object *obj); void s390_cpu_system_class_init(CPUClass *cc); void s390_cpu_machine_reset_cb(void *opaque); +bool s390_cpu_has_work(CPUState *cs); #else static inline unsigned int s390_cpu_halt(S390CPU *cpu) @@ -341,6 +342,7 @@ void cpu_unmap_lowcore(LowCore *lowcore); /* interrupt.c */ void trigger_pgm_exception(CPUS390XState *env, uint32_t code); +#ifndef CONFIG_USER_ONLY void cpu_inject_clock_comparator(S390CPU *cpu); void cpu_inject_cpu_timer(S390CPU *cpu); void cpu_inject_emergency_signal(S390CPU *cpu, uint16_t src_cpu_addr); @@ -353,6 +355,7 @@ bool s390_cpu_has_restart_int(S390CPU *cpu); bool s390_cpu_has_stop_int(S390CPU *cpu); void cpu_inject_restart(S390CPU *cpu); void cpu_inject_stop(S390CPU *cpu); +#endif /* CONFIG_USER_ONLY */ /* ioinst.c */ diff --git a/target/s390x/cpu-system.c b/target/s390x/cpu-system.c index e9f8e7cc72f..9b380e343c2 100644 --- a/target/s390x/cpu-system.c +++ b/target/s390x/cpu-system.c @@ -39,6 +39,23 @@ #include "system/tcg.h" #include "hw/core/sysemu-cpu-ops.h" +bool s390_cpu_has_work(CPUState *cs) +{ + S390CPU *cpu = S390_CPU(cs); + + /* STOPPED cpus can never wake up */ + if (s390_cpu_get_state(cpu) != S390_CPU_STATE_LOAD && + s390_cpu_get_state(cpu) != S390_CPU_STATE_OPERATING) { + return false; + } + + if (!(cs->interrupt_request & CPU_INTERRUPT_HARD)) { + return false; + } + + return s390_cpu_has_int(cpu); +} + /* S390CPUClass::load_normal() */ static void s390_cpu_load_normal(CPUState *s) { @@ -158,6 +175,7 @@ void s390_cpu_finalize(Object *obj) } static const struct SysemuCPUOps s390_sysemu_ops = { + .has_work = s390_cpu_has_work, .get_phys_page_debug = s390_cpu_get_phys_page_debug, .get_crash_info = s390_cpu_get_crash_info, .write_elf64_note = s390_cpu_write_elf64_note, diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 97d41c23de7..eb2c6650989 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -126,23 +126,6 @@ static vaddr s390_cpu_get_pc(CPUState *cs) return cpu->env.psw.addr; } -static bool s390_cpu_has_work(CPUState *cs) -{ - S390CPU *cpu = S390_CPU(cs); - - /* STOPPED cpus can never wake up */ - if (s390_cpu_get_state(cpu) != S390_CPU_STATE_LOAD && - s390_cpu_get_state(cpu) != S390_CPU_STATE_OPERATING) { - return false; - } - - if (!(cs->interrupt_request & CPU_INTERRUPT_HARD)) { - return false; - } - - return s390_cpu_has_int(cpu); -} - static int s390x_cpu_mmu_index(CPUState *cs, bool ifetch) { return s390x_env_mmu_index(cpu_env(cs), ifetch); @@ -394,7 +377,6 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data) &scc->parent_phases); cc->class_by_name = s390_cpu_class_by_name, - cc->has_work = s390_cpu_has_work; cc->mmu_index = s390x_cpu_mmu_index; cc->dump_state = s390_cpu_dump_state; cc->query_cpu_fast = s390_query_cpu_fast; diff --git a/target/s390x/interrupt.c b/target/s390x/interrupt.c index d68d8955b1a..4ae6e2ddeaa 100644 --- a/target/s390x/interrupt.c +++ b/target/s390x/interrupt.c @@ -30,6 +30,7 @@ void trigger_pgm_exception(CPUS390XState *env, uint32_t code) /* env->int_pgm_ilen is already set, or will be set during unwinding */ } +#if !defined(CONFIG_USER_ONLY) void s390_program_interrupt(CPUS390XState *env, uint32_t code, uintptr_t ra) { if (kvm_enabled()) { @@ -41,7 +42,6 @@ void s390_program_interrupt(CPUS390XState *env, uint32_t code, uintptr_t ra) } } -#if !defined(CONFIG_USER_ONLY) void cpu_inject_clock_comparator(S390CPU *cpu) { CPUS390XState *env = &cpu->env; @@ -225,11 +225,9 @@ bool s390_cpu_has_stop_int(S390CPU *cpu) return env->pending_int & INTERRUPT_STOP; } -#endif bool s390_cpu_has_int(S390CPU *cpu) { -#ifndef CONFIG_USER_ONLY if (!tcg_enabled()) { return false; } @@ -238,7 +236,5 @@ bool s390_cpu_has_int(S390CPU *cpu) s390_cpu_has_io_int(cpu) || s390_cpu_has_restart_int(cpu) || s390_cpu_has_stop_int(cpu); -#else - return false; -#endif } +#endif /* !CONFIG_USER_ONLY */ From patchwork Sat Jan 25 16:05:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859799 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1321689wrq; Sat, 25 Jan 2025 08:12:56 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVRTkdzj2aV0KLxBsHvnhzMRXxHzklW8vb08MvNlEE6+PjfNNZMxLFUpcKaxEkqIb1F20PaRw==@linaro.org X-Google-Smtp-Source: AGHT+IGjmt7EI8GzXewFhs/4CqCCIprPB2CqFPCnantnojlb1zzZx0G+yHwmr48PDMSwlO3Czqzw X-Received: by 2002:a05:6214:27ef:b0:6d8:963e:b4d1 with SMTP id 6a1803df08f44-6e1b2166f03mr572055226d6.18.1737821576623; Sat, 25 Jan 2025 08:12:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821576; cv=none; d=google.com; s=arc-20240605; b=QN2nLbCko0ebsomu8xG9EQjMUkQgUB2YpieUhIjqsOuz4C8qxlsvAEVZWOWe2tgZLj Vqy6oOJG4WbehK8HqbOku3rUVNY2oLRBIeduCiRIbNNRVh9/61HENDQBD9+ZYzVEyddz q2BJi9UpLKtNpOzL2YxdxxNHPnwJsrjRJdDCIJHQBds9626q+/iKKoece7P8ThAyoqnz rJ19XfhAlRYdqLYFqh4dqBbuZxfHGiOswukrFADL1g0Pjs84AOt8oTebMZ4OywGx99ch tgROlHl3k0jW8mCgOBAmu3xvfnfBsvnPsR5G9v3DopkiBJsv6PSMMf6/2Cms6bAQj4iy z2rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=vwxPouX1MPfj+qZCG+Ip7+cwlRNTkTH48zQoUyHbOFI=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=UkfbWJjSU95tuvwZrd2gJ5m0TlJ5WJ/swUmj0CKDz9Yr/wKC1shi+3WvOhzqiGHZDH udE/+RGNDF9AbmfJz2zJAhAkttl1Uu7l39qhgPfBRL34KjqDoNP0BU1zZJkyAfpnBzG1 yidHUaT4qVZtb36eaZ+QGYi1334I6vkKvCtrbvdbmJm1kehVHUynUngE8pdwSS+hPe3v wrEDLs8LD6hK5pAco9Lz0hpeTmVVd/nktj02/HbMQ1lFXtMp27mLYlWUWctYNL8j+ESe ft+cqFylKfpxB9ENNLgHUxpOnpe4DR0knBoGp8dlIhvaXHfW90CXOvojVxugi4LSa9wT PmJQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vwHy1xlG; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e205f05601si49914966d6.330.2025.01.25.08.12.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:12:56 -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=vwHy1xlG; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbiiA-0006Ks-ET; Sat, 25 Jan 2025 11:08:42 -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 1tbih6-0005NK-Tz for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:40 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbih5-0000pL-6x for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:36 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-438a39e659cso19666355e9.2 for ; Sat, 25 Jan 2025 08:07:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821253; x=1738426053; 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=vwxPouX1MPfj+qZCG+Ip7+cwlRNTkTH48zQoUyHbOFI=; b=vwHy1xlGxP7b/EPE33Y8/li9Q3umNNUN06eGCcHrFsuRrUllqZrMwQGY1BQuBHDLQi pIROPhw9evbPePHZyeY5v5P9/fXoLyojXDhtNud6tr+4pj9uObaasUcpjoRCApEOC0Zg tIPapEfhIU3/oqBRNdQ7MjlBmeWRo3I3uqtKZTwJEs8urkFPmCmeOPaOSz5cFT0Y3Mwt yig5+ViYlkBsn0u/nLa1a/4fL/tZzhkRcgpXyOO9Qw1IRx60wfSgcuv/j0UAimJaHkPQ UE5POHrbVHrwyCg5m2p2MlWBfQPh6WJdn93ijdwlctClDQvOAfynPv32KSQATFEZxWqX HHaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821253; x=1738426053; 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=vwxPouX1MPfj+qZCG+Ip7+cwlRNTkTH48zQoUyHbOFI=; b=cbNYZAgkA3TVxwNd72evDLiTHIB2A7Epy+8Ts0B2MvQgrIjIA358N5TPsbHFT8pzVg DsuRH5wfQMOatQYcoU/BEdCObRc5PmB3MGXnMMh+td7rn/+1z/5LbNi4EoW39kxF7zLh zmzWe+mhmgl5fmkXrf0kyubWx5cmUduywjBGHVFWeJ/lqTKl6iX6ixcBtEQyBQ3z8ZIL YvzlxrcSLuvdsO3/ggWnNgn2Mue4Ce9QJD2sjxKbxhbnYdtMr2By4WdJNxuhhFKr/N8M zZ0Ep3OnkGistzRGcRBTMRqTVVmBUfDV1V3cyMBukhM7f9GfY7z2vGAijLeEMZkxI5IX LcqQ== X-Gm-Message-State: AOJu0Yy8+J7sRuIQmiei2u4BB/mZoefFzq/yOFgyvifre1uQ4H7sySDn 0rh4H8fx4NeVbp/rHD1fvZYjGDzulMy1K7VXAmeFeYMTSVEe0sxJkjrb15frXJbITnDhBXi7J9S aGNU= X-Gm-Gg: ASbGncv1nvQVCGt70Zyb3N/LuXYclv/T0/GAkm4o8qXB3uLa3YQxLdcf9zsKl1RLZi6 B8eCNmVkbhAe+s++xEgFjvL/UZjVNssEb6LFuw5wFFgLJmE0LVmWd0j5Ew9KmKVC4pAg64OD7aC M/wa6DFlwDNcs6BSGsbOuXl5NWDsduqKO65EUb+L54tUe2mPXkY8Cn6HDbaKUpThaYelW6vZKfJ 8Q4ubJg0RcLCFqFXmSMTz1eoCZHjHnKANbw7Ic5iyYKBnpohTTtS75jao+Jtq6U68s57B37nyr5 bviGhdHfnTM9AuETmM+S/gl2OPHYqZvF30C8pkwHy7nD6sB0YpULDGydFuWB X-Received: by 2002:a05:600c:3585:b0:434:9936:c823 with SMTP id 5b1f17b1804b1-438913ef6d0mr330481085e9.18.1737821252907; Sat, 25 Jan 2025 08:07:32 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd48ae29sm67355635e9.22.2025.01.25.08.07.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:07:31 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 20/24] target/sh4: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 17:05:48 +0100 Message-ID: <20250125160552.20546-21-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/sh4/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index 24a22724c61..80a66e1f1d6 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -82,12 +82,12 @@ static bool superh_io_recompile_replay_branch(CPUState *cs, } return false; } -#endif static bool superh_cpu_has_work(CPUState *cs) { return cs->interrupt_request & CPU_INTERRUPT_HARD; } +#endif /* !CONFIG_USER_ONLY */ static int sh4_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -243,6 +243,7 @@ static const VMStateDescription vmstate_sh_cpu = { #include "hw/core/sysemu-cpu-ops.h" static const struct SysemuCPUOps sh4_sysemu_ops = { + .has_work = superh_cpu_has_work, .get_phys_page_debug = superh_cpu_get_phys_page_debug, }; #endif @@ -279,7 +280,6 @@ static void superh_cpu_class_init(ObjectClass *oc, void *data) &scc->parent_phases); cc->class_by_name = superh_cpu_class_by_name; - cc->has_work = superh_cpu_has_work; cc->mmu_index = sh4_cpu_mmu_index; cc->dump_state = superh_cpu_dump_state; cc->set_pc = superh_cpu_set_pc; From patchwork Sat Jan 25 16:05:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859791 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1320618wrq; Sat, 25 Jan 2025 08:10:12 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW7jJ98aTsCXbV2Eb1p7ni3wXwa3mIqQ0F5AUuWvcH8lmMz5eJn1NyUETU8r/fYNxCTM7ftaQ==@linaro.org X-Google-Smtp-Source: AGHT+IFhX25CYmxEFge8QCaK8+dP7e5plmcdXKcvt3TSYg6OAU3LFdzPn7vbdLnnj9mtaoETPuqi X-Received: by 2002:a05:6102:26d0:b0:4b2:cca8:88d0 with SMTP id ada2fe7eead31-4b690b8780amr28768726137.1.1737821411775; Sat, 25 Jan 2025 08:10:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821411; cv=none; d=google.com; s=arc-20240605; b=AvIeEoFYyqRtXR0CQ9wtptKUrieFM3PsXWWepsROE3MD7ULhwuzdwTIh2F32+Cu0t2 B96gnBU5QIS2kCojCFz0BmFt6M7iRGMYAhTKhe3fOuRZpf31V1EcYyEAp8M8EuklK/6H PJR11NOnzFJxRHpZ7r80qQYAcTVJTJC44xlt95Bzft/8NPopD6gtTQgNtCf8oe/dsLwX WxGD4Fh1YhBKSc80FoyfyMpYY/3Rcllne1NVsB+CAAL2pQPbC8l8SXMk4CA/14SjlBFG JxbGE6uxXZxo7dQu+DiYBl/inbllMpTRZgs1XuedgKbOKtR+Y2nCtVi4EoFooQBtpNZJ 0KzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=wNzeIykutuJ1S2XsFr1DnQpgi/RVEgAeGStb8yeCtY8=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=YHnuxi6kWGA9B6Qt2I2O6Lrr+thqVO4XjGHP1t3JnVVkEgl+FnOVoajXpBdTbN2t09 gEqBAEbgED2tNvacoePBYk1XgIufS4TwP1OdXArCLtGoua+AjEcW+qS/8vjoVOJMsDIn e/AegNgz67fqtSsYepvLAt7VVtGOAr/lPJilKhXGETjcG59fCoEJi7ErOWWJxHVyA8Jh MCurqotFgqYL9IrQr4/P4gMQmxFNCxrpZhECiacfCT4HrtCLDYlzS+NJrsxEWjQhrMn2 3KfbEP0VXYbAeNaU5ZD33KDJgWwrxnt3ijulBynVWYkuLeg5r3G7sFbvMVGT/XOEC/uO pbHg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eHF14orn; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a1e0cc1a2514c-864a9d41020si1366451241.182.2025.01.25.08.10.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:10:11 -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=eHF14orn; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbiiZ-00072O-ML; Sat, 25 Jan 2025 11:09:07 -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 1tbihA-0005SD-T7 for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:49 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbih9-0000pz-8U for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:40 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4362f61757fso32018825e9.2 for ; Sat, 25 Jan 2025 08:07:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821257; x=1738426057; 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=wNzeIykutuJ1S2XsFr1DnQpgi/RVEgAeGStb8yeCtY8=; b=eHF14ornHs2nMOinBWJFnNjxCMfPJCFlUC3OK5+Tsj9m+AQv2JgcXsQeTKweJDj8oU rjCu5AszUoV9Y6Hymc6WwnuIYpK5EgVPLTnjF8D9PvOvZaBv7G0dX2C0Xn0PIv2uORrI o/hYL6EEUVDlKNfPt2MHebDrzLjj7qbQy3yEHdM8qAUp8w1sikjijB43u4M6eq9em8Cr dclIwXP8c3CXRTbKPP7DqU+vFcE2zJthyp2dlRInUa7NMMFVtdNVyoXS/xtJRJ/VjMss yabBhlhu6o4XmPCqcW+VGexgZSlEhsLbDghw62WsVFowpchFT1S4aNQo4qmvhqkFoJ1c /iXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821257; x=1738426057; 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=wNzeIykutuJ1S2XsFr1DnQpgi/RVEgAeGStb8yeCtY8=; b=nendCJTbhyp4TdD2yT6qr+Q0xHS8bTuY9Vbf/KzxmOkF6F6LCeDiHGA1c1DgGrQ/2r BJyeKPg5+ycmMoRm5wuHFwh+WSkxKBZdHWrFfPDGBBxSSC+d16Kj6R5IX8zfBEl0lz/0 tJ/1NczQTK+FrR5Zg4GTZMc70ggXTZiGTeZsaf9TZIeRFYBzSJhCQne4TtBhrEiVl17M insgdz7ouNVWLnbdivTY5UJ8/FrllQq9NzwzZT622h4XOmhbMKg+8PEiKzJzmYz35fpw FD3I1fXpbw9x3jY0EsVZPHrhbEMXp/g9Z/9VOMdVUgT9B0GHcLzZbsJNH+ZNcCKWCHNX I7ag== X-Gm-Message-State: AOJu0YxGWCYAM92fwN+RmJdbfxRFKGIP4U1mv0mwANIHg6f3X/xzFyjP i8DbxZhBxCVRVfc0vNUCJvWsOveCZalUk/Qq+3MxUZxGhb4IEld0JQoL8S+IZyb4TMo9NrlTDUh +rDM= X-Gm-Gg: ASbGncuqQ3p1Jdkf7OfUltCq4kALTiFosbg/yC+hB05KK/MmMPMokS25XIjSGLovNQJ oU3y5Loa5k3u2E7YIk/qZL8/usLRur1E1ichlOWNifOzTg+io2rlGQ9ddUbpeQO3g83+4HZ8qMi jRspWsZTowiKlXCiQ83g6ReCSIE4g4lsAkldyNJyO3TA+dT7EcSejIqjLz8cAfIgYiAC/iKswn5 hTuYb/DWllpypk3BFeDt/Sz/eQD1djAgxfmGQrPtNmlzoNmwME1II4Gm3bMEIkkl7dAM9qs0765 PkvvjyPhC4utiNbvjrPH8yMP/4NOoJeR/QtbLn5bLwFZsXYOMVGUS3nItwhF X-Received: by 2002:a05:600c:4713:b0:436:9227:915 with SMTP id 5b1f17b1804b1-438913caa3cmr273402185e9.9.1737821257390; Sat, 25 Jan 2025 08:07:37 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd4d3dbcsm66717135e9.40.2025.01.25.08.07.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:07:36 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 21/24] target/sparc: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 17:05:49 +0100 Message-ID: <20250125160552.20546-22-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/sparc/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index fbd38ec334a..94e807f9f84 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -776,11 +776,13 @@ static void sparc_restore_state_to_opc(CPUState *cs, } } +#ifndef CONFIG_USER_ONLY static bool sparc_cpu_has_work(CPUState *cs) { return (cs->interrupt_request & CPU_INTERRUPT_HARD) && cpu_interrupts_enabled(cpu_env(cs)); } +#endif /* !CONFIG_USER_ONLY */ static int sparc_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -986,6 +988,7 @@ static const Property sparc_cpu_properties[] = { #include "hw/core/sysemu-cpu-ops.h" static const struct SysemuCPUOps sparc_sysemu_ops = { + .has_work = sparc_cpu_has_work, .get_phys_page_debug = sparc_cpu_get_phys_page_debug, .legacy_vmsd = &vmstate_sparc_cpu, }; @@ -1027,7 +1030,6 @@ static void sparc_cpu_class_init(ObjectClass *oc, void *data) cc->class_by_name = sparc_cpu_class_by_name; cc->parse_features = sparc_cpu_parse_features; - cc->has_work = sparc_cpu_has_work; cc->mmu_index = sparc_cpu_mmu_index; cc->dump_state = sparc_cpu_dump_state; #if !defined(TARGET_SPARC64) && !defined(CONFIG_USER_ONLY) From patchwork Sat Jan 25 16:05:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859790 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1320516wrq; Sat, 25 Jan 2025 08:09:57 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWVSBZs/OQhwvwo2o+xW0AQvarhcUkESRDCKr4iHA8DqeJZ4b5pWk7u8VDkXhbdOGDqibfTqQ==@linaro.org X-Google-Smtp-Source: AGHT+IGN5CZx8O5X99elFMGiVk4/e4NQTtLww1tt0pj61y8C6AfQi0pJz7CJP977g0B0VwM6p51E X-Received: by 2002:a05:622a:134c:b0:467:6dd9:c961 with SMTP id d75a77b69052e-46e12bbee8cmr523709811cf.48.1737821397696; Sat, 25 Jan 2025 08:09:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821397; cv=none; d=google.com; s=arc-20240605; b=jNpABS+o3O+9/f1SbSunzu3FP41q/oFAL7GS65tyCNWcf0dOtVmmCgt0k32jFf98bd k7Ar/u4/cgvZVmgKjD2nqUUiDUrsV0AdrsLa3U+66v2Ey0WdNHJw0VD5eLYch8FCKEX9 Y47F9Jw9VTFrNH2VVv1VhCGQf/I32tafGpiymfiaus3fS+knQOEBMSc3JbKX2fQBrLnQ NHUBSfJw+Zpgaxg33zZ0ikNWIRMuDKfEHWIfBUFuQ31nMUfmZAncpYYG3k5oC8Pi45mV ZMCHljCkplfmwlB8hsAxRGwiakSlWKtsCkK8K5Ah9q3h5Pzk4yCiNcJmdAm4c/twysr1 FblQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=UZ8BDmUkV3T9ZQW07wpYEtUOuZG1AGKnmguq5EirG8g=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=hBj/5JQav99xmEpSwpYXAtVWF4PgeG3jbX3cXgI03JOkKRfzoFlkvRniK7v2TfeybT Ly3lhNs0Vy2u5NPaBzjns8ptxp/qfQS264N4gk7Zi/dStiqhQn1j0KAlGMwHFiW1pDDM em2UoI3Yz+GS4J8VzXuwHwTi5SQi7NRb+hnaoX2FEJieKsRfQU/xezidQfhdW7IQiy/c 7EtgbCkR9mp6SdUNAZEi58PrErXjbXfDWvaZ7TAU2TQP8QxdHDY2EV6ZsYJ6b9PGDEjw EncLyO4nS0MMylaY6RmNZAbXV1uYySwuv9pIWfgIHeYiBpGwUAtCkSepMydHdHAHwRQD WDTQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ga76srhZ; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46e66b6b338si58693101cf.249.2025.01.25.08.09.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:09:57 -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=ga76srhZ; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbiiG-0006PS-UV; Sat, 25 Jan 2025 11:08:49 -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 1tbihH-0005Vi-3n for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:55 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbihF-0000qU-Kt for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:46 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-438a3216fc2so31513255e9.1 for ; Sat, 25 Jan 2025 08:07:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821263; x=1738426063; 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=UZ8BDmUkV3T9ZQW07wpYEtUOuZG1AGKnmguq5EirG8g=; b=ga76srhZr+ZA4p5oAwwhLPBX0FpM9x/evZVdMKDHPokyniX5knFStBoUT8NvJADeWm hPJxhQ5DvExpTUSxUmN19omzyTQ2lbFnEVTP552KrLNQThtQ5w7Ga1bZlOfdb06kjq7I pCDOZnxV9CkFRi88JlSFqqgI/Z3k7Q5+hN5R/8SuvOVtJMIiFkzERya7I4igoPsaO5D2 wsh7ZcOxlCLqbs+rrQAcbV3W/pXf1TMAVoV1AqxLEH4m7FD0HSG0C+sFOPI3v5otLfgs K0VzV+ZZ+GbIqC9GwwnKb+//qoVh1yuzjTxLmQdWoYhx22OF7uZvv3kR0EovfDyI3qPX iopg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821263; x=1738426063; 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=UZ8BDmUkV3T9ZQW07wpYEtUOuZG1AGKnmguq5EirG8g=; b=dv2nw883st5Oo0+lamLhfbk6Tcxgy5JSffu4RI8+3bvE+q76OMeJ8VAcnPlsK9NubR Qo7mSufT++nIY7AaY4ohghPq2gZpjn7FuUW+UskWm8Z/QwDfs4HDOfUJlJBaH7Nh0WSU Uh5pvFni123G5gVZUNA4H1Pb/OjdFijmWYofetk9rLNLi2yKdWOZrpcfMSsISiAUJOj9 HFmvassVFc9D8EBlB1outf/cPu2+irUG+s5VBissoE3DywoIUdBK4LV4kW2Ad/MtyWgA 8gCwOwo+JnFSn6JjqsMPGu6oUERNkxDDqPf/Or2lMVQaYuD8M3+lp/38YKGtsCEA+/b4 qwwQ== X-Gm-Message-State: AOJu0YwCmpnZhnTEHUKhSqE0uOigoscsgsqQGR0YOpGv5VQE0scuGIWU 7eXGOfXL/+92Q7Igw3T4SyqoBIZd+3uFim28/8lwPwauvhTWoe/K2OgvH3q28cFR/EoZsXyDKBB 7lOk= X-Gm-Gg: ASbGncsDHHqcMwqXz0szMcpLXQUHKQcGOKm89EJNNXBIG1lArgfWgj20fMWG8NNTiqf 5XlJX7XmC8W0TIsbSWADjwxcW5dhHjjmhIF8GqoaFlvkrln7iOYXS8uxmuh62xvRfV/EUH+ATq0 uxQXdc20s/5ogzEB2UkOKzDONJMT1WBO+EF/GmBCv0PulcfibNwLndLtK4huqTWrbW6wr8BC9tQ QuY65aRuyUrwH50bT54/yCTVtIB0vsSnwRpcUFyCob3/UfVgb70cazTkDK2bT08ETybIPWJKPwH 1e0DzMD0yWT29ys67rSwa12GjeIw/kYZXFzsrscpPsXIRQPlLjk7Fvm/HG5O X-Received: by 2002:a05:600c:350b:b0:431:58cd:b259 with SMTP id 5b1f17b1804b1-438914671fdmr358035835e9.31.1737821262753; Sat, 25 Jan 2025 08:07:42 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd485695sm65140295e9.14.2025.01.25.08.07.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:07:41 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 22/24] target/tricore: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 17:05:50 +0100 Message-ID: <20250125160552.20546-23-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/tricore/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c index 95202fadbfd..e4f95876efd 100644 --- a/target/tricore/cpu.c +++ b/target/tricore/cpu.c @@ -165,6 +165,7 @@ static bool tricore_cpu_exec_interrupt(CPUState *cs, int interrupt_request) #include "hw/core/sysemu-cpu-ops.h" static const struct SysemuCPUOps tricore_sysemu_ops = { + .has_work = tricore_cpu_has_work, .get_phys_page_debug = tricore_cpu_get_phys_page_debug, }; @@ -193,7 +194,6 @@ static void tricore_cpu_class_init(ObjectClass *c, void *data) resettable_class_set_parent_phases(rc, NULL, tricore_cpu_reset_hold, NULL, &mcc->parent_phases); cc->class_by_name = tricore_cpu_class_by_name; - cc->has_work = tricore_cpu_has_work; cc->mmu_index = tricore_cpu_mmu_index; cc->gdb_read_register = tricore_cpu_gdb_read_register; From patchwork Sat Jan 25 16:05:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859801 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1321725wrq; Sat, 25 Jan 2025 08:13:00 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVMpHuC0v9MjVEEMAt4ddxcr9YMlxyx6fxS3cXKATzt03GeUWpabdgHVeT48Izbds6GRnWF8Q==@linaro.org X-Google-Smtp-Source: AGHT+IHzxbQAVhS3Yo0jOyMfbP07BUFNHb6+TTTl9HmgxhKkgKmVxewi03/Le5RmNG5aOS+du3E4 X-Received: by 2002:a05:622a:1993:b0:467:7513:3d8 with SMTP id d75a77b69052e-46e12a46083mr510086181cf.21.1737821580527; Sat, 25 Jan 2025 08:13:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821580; cv=none; d=google.com; s=arc-20240605; b=kzU8v9OFeNs4fZvlzJyGnZC1bRzlsHFWEQW3B/miAHMUx0VmJqWrsUff4Wfe9SdCOZ BIe4dzd9+XPSkxIixkTwVrk3tsWmwgVRMyRd77Sxu3oJy9WG2TRN2mO4pS+27GzCJV3E jw/fXJ3ahhWs85Wkpvne1u0hHNLtftkc213AOpqy8kR339+pVU8Ye3FMXe45IJUD2sSN GWsExv/Jzx428+WvhroNbbm6Uv30Pc4SOeFMiHDc/olhoJ6cdFHuDea+a82W/LcvJ/MT da3NtH+9IvWrvgvyhZE0odaxXvRSxBScwtnhvL3ybylGUAvdLAcoHhQMjH1N/Thy50ja R3Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=0UoGE6unHTvdGpTVXrJG1+71hPq/Dfx21A2EoHEuKVI=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=TVa4dMnJNob2JgslYXGHyNJP4rRGihwhLbdCroSFLyhjpw7LQ8ci78vp1P9Iq93Amf RAWMff6cr7H7/ehCZShB+EOgUfEzpw41NxMeyhS0XTzAYbTSfYo4hjG8BhGTLkoGUL+s FrGsKaxWwhRxuNjhtEus/DoGzCDbWpjyqJLs3bYHoT35dHmqFOf78CtGTp215l81BI6o lVhrofk8kA3nOJ3NccZJnb3PDJjjA1+V32k/brj8G3ysRT3FroQYAITkA3VRSiRh5SVT VDLdRgSkZzfXXUgQhNdLbTBX0ihks1KFGXdJ+ayx6J91z8aOOMlxx3Jk95/7m8YDtfn/ Eg0g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hHYsesyx; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46e66b6800fsi50508901cf.324.2025.01.25.08.13.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:13:00 -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=hHYsesyx; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbiiR-0006UU-Ri; Sat, 25 Jan 2025 11:09:00 -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 1tbihT-0005gg-3H for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:08:01 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbihQ-0000qs-BT for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:58 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-436345cc17bso21777825e9.0 for ; Sat, 25 Jan 2025 08:07:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821267; x=1738426067; 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=0UoGE6unHTvdGpTVXrJG1+71hPq/Dfx21A2EoHEuKVI=; b=hHYsesyxy0gJMSS/wGrF/rwHtjJIq4fNXH/Pj6jF+6IXEqu070v99jdCy0tfoZxJEo DDEWSxZYkiwQkSHgbx+ftNwd/dAtd8Ut/5Wof88jkbyi/ksx34gRxJedXW0UfBO5c/NA TaQj7Ue8/Mg1/mBUPV+J4X6JY9TD9DEOYEvolO0aRkNnWmp0l8x7fcGIfCvH9R8357Bn WewTV/EVypWJb0NuowInkE9aNW30tNrwpjrv8JMmgxZBmWsjBkmWkNEexx5PtnVdl6O/ fvHXm80PPEMUr9VM5zKYKlbN03nNoZednxjj4Lu9EGcCUXrHVWlhptO4eyHIUaucPF4x A98Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821267; x=1738426067; 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=0UoGE6unHTvdGpTVXrJG1+71hPq/Dfx21A2EoHEuKVI=; b=suhO9O/1+1ILaN7QpO60wCCcF2/9eftefPyqXSZHXBE1tFiIYvjjeepNwxEof8XIi2 PutpV2tK+WC4qUC56oHvZ6ChgmO21bSDpn0CzUjmO/BjYJIVMKwyWQQL5eJAm4p4ZNGP BlaZ7JKtjBkoCDenLRK0foH1HbkeXPCWEi3a7z//aMAOxWpHX8GEaeTfl12KaK5OikHG BdUTL/WkBR0t6CkbBF6N8rDjZ9MxKt/gvrNdv2gP9E5LjOhSULauEoYAhYq1z4p2UkuK TSb51FjiTLlQaf53wafOlf3UtPatrFhp1qK7XRBxM2Jmr9o8d19ipnDY0APtSvy8pPiJ mooQ== X-Gm-Message-State: AOJu0YwSzc5oCVFA03w3dPxS3mKJm6CR2oPbO/QbuuNUuGS4FOkhED22 vjiUmb55GwsQHPFlajoh/HkO1q2YmtntpANvHYYSJoGfgh+aOuvXH1F4nNnxnBoP4zvzm6+DRR/ IRx8= X-Gm-Gg: ASbGnctdvT4zBhlT1YRxx9z82G5r9SfXzP8C44tLGxjZR/5xKrlZbZtUw1FhHaRbfo6 /SIvNmlKOWyuRiFPkrpVxtqVnKUNMikwpgkOjAkTBe/8S7+z70EfTNnBpiYPdwUspfJvRfldron RNlkgUe4IgOTygxXTxjhSdr094h5+zhDZIGCcxDSAlQAmSVPTeJeFdBFn2Ei+QUG7BUCYlj9EHp HnBRwsecKBGK7UFRXJR9Nk6iOyUFleHuozomHedhYen+XdFhRzQlOcJCNlzIp9lbxkl/rpe9d27 5ZZjUNe+xZfAoXXfGLP4D/+gB0LiZchvsKDOit2YFf9dM82+iuvhNeGmJTk+oMBY3CEMOXw= X-Received: by 2002:a05:600c:4ed4:b0:434:fdbc:5cf7 with SMTP id 5b1f17b1804b1-438914373e4mr310199725e9.27.1737821267377; Sat, 25 Jan 2025 08:07:47 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd4fa463sm65705545e9.8.2025.01.25.08.07.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:07:46 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 23/24] target/xtensa: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 17:05:51 +0100 Message-ID: <20250125160552.20546-24-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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 Move has_work() from CPUClass to SysemuCPUOps, simplifying xtensa_cpu_has_work() by directly using CPU env. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/xtensa/cpu.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index 4eb699d1f45..c5d7682f4bf 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -63,16 +63,14 @@ static void xtensa_restore_state_to_opc(CPUState *cs, cpu->env.pc = data[0]; } +#ifndef CONFIG_USER_ONLY static bool xtensa_cpu_has_work(CPUState *cs) { -#ifndef CONFIG_USER_ONLY - XtensaCPU *cpu = XTENSA_CPU(cs); + CPUXtensaState *env = cpu_env(cs); - return !cpu->env.runstall && cpu->env.pending_irq_level; -#else - return true; -#endif + return !env->runstall && env->pending_irq_level; } +#endif /* !CONFIG_USER_ONLY */ static int xtensa_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -224,6 +222,7 @@ static const VMStateDescription vmstate_xtensa_cpu = { #include "hw/core/sysemu-cpu-ops.h" static const struct SysemuCPUOps xtensa_sysemu_ops = { + .has_work = xtensa_cpu_has_work, .get_phys_page_debug = xtensa_cpu_get_phys_page_debug, }; #endif @@ -261,7 +260,6 @@ static void xtensa_cpu_class_init(ObjectClass *oc, void *data) &xcc->parent_phases); cc->class_by_name = xtensa_cpu_class_by_name; - cc->has_work = xtensa_cpu_has_work; cc->mmu_index = xtensa_cpu_mmu_index; cc->dump_state = xtensa_cpu_dump_state; cc->set_pc = xtensa_cpu_set_pc; From patchwork Sat Jan 25 16:05:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 859798 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1321594wrq; Sat, 25 Jan 2025 08:12:43 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXQ2VNTGKo4ENXRB2dT7MZArh+ABVaxoDU8BXbPq0uYdZ15GKCPc/LHnzU6qm/tV/DjaSHteg==@linaro.org X-Google-Smtp-Source: AGHT+IEyaPau0599KUUdes/RvbInwQY/NvNI3gLuAvP3USiYQlq6Vnm++3HO7mXhOJTzHBIrU6wW X-Received: by 2002:a05:6214:1bc7:b0:6d4:586:6292 with SMTP id 6a1803df08f44-6e1b21aea0bmr467001896d6.26.1737821563440; Sat, 25 Jan 2025 08:12:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737821563; cv=none; d=google.com; s=arc-20240605; b=SWteT72uOJb0QbE6pOSCXxaJMhSWCEklQABs4hdOBfRnVusFpAwEJyuG9ZVMIvf45o H6ujpZU2Xv+lmQzIOElDiOpGpSwefGzFWo1yFhf/yNP0xZw/eS0xVIfCXGdbxvrq+gYQ xeKDgkzEdjalJgestLqL8a8gd5xyq8qqsZLgaL7AZZn2VHJxZfoCkKHVjTGPSiQp0lN1 VHjH+Hj00SNaZ19kdroOnUJ21JDJwotM7oEs5cqb9I7qgfC5MZvps/qtXIjtNMlrvDMR V2o2DSwV/gJKoHxl4w39n5avSi9CCBif+jry3n+nY5PlCnkg0hiXJZ062XyMjclFVVRl xMHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=5jEVe+YJcTp7UAkGQALuSFnfsOHF6JbuBlxYoBxiLJI=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=SmYJcna2a5SaToTEpz4raepfOrvP04jVV8IJ/uU7pjqKjjtz23TyspWph0tugrYMhb d4ezei7BCjZ9AsGtsomZ2fwcHyT/2nwHvd1d5uBiVUryu99khJFjPE8KxCqo2Grwz5iQ fvUrKwlywvk0it3JCwCWq8D3ftwGX7vvosgZFXH3VP85rHcrn75/hTXUqBcZ4iYwZJAc 18XeM6u/NaM+p/X40Vj4PMJ0Yd2OHXRJIizs2KOaQuHLm8iG0ewOPPcgl5dvYsqQI8n7 ReRvDkVexAXsYNa77QhEetyml8xNsuiIK1NTiZVb5bVet6NjrxEQAPG5Esl+hAtVUJiU j0Dg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=emGWG8f+; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46e66886c51si57877811cf.158.2025.01.25.08.12.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 08:12:43 -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=emGWG8f+; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbiiM-0006Rw-6n; Sat, 25 Jan 2025 11:08:54 -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 1tbihT-0005iE-QB for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:08:02 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbihQ-0000r4-O0 for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:07:59 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-43622267b2eso31632395e9.0 for ; Sat, 25 Jan 2025 08:07:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821273; x=1738426073; 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=5jEVe+YJcTp7UAkGQALuSFnfsOHF6JbuBlxYoBxiLJI=; b=emGWG8f+wSEEV1snF87Hselcan53i0B9UvyG/dkNohGE3oR05W5oqp5z6G+gvVwiN/ TblnoxW1KNLA2Gloe2VjBxj1QJMPHGsG5OuvGVsZ2RCaF1rWUWoz0tkWCHtXkVNZV80v M5j15cFKKJg8CdUpPeUsFIltplN6hJqfVxneabffXF161GhZn0Mt+YgeGJkD3Sae+LsD yfomMMwwz0lJ0/bifvcrXtnvSi47C8sWnDI6IwPquRITo+xDo6phJdPGV9snsCbp62Pv Mf2C/kNqz+rxtK1xthdySyZYWtoGo+HGe6UoOHBDKWPbzV0KK89fBpTE9b6rwPiECTMi DZ+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821273; x=1738426073; 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=5jEVe+YJcTp7UAkGQALuSFnfsOHF6JbuBlxYoBxiLJI=; b=E1RAHCGGjW2J7D/FEn+MUTbzOTvjulXK7Io4h5L6FS+TBGV8IRx272C73rxewLqKBP 03cFrltuI9o4sriNHHP4+/46cLLmEyn5mvtHBjg84XBPevkjVbmOOe/H2z6ZDXjDVJFd /uxu6TkymfnYHcSK1OPEXQvx/c4Ov7GaqF8oUMr4Xizbhd72eOFtuo8NwCUVRxiWIho2 93sUvJ138XK2mnX0b4KlWXpDuC6r00bX0IQInvaEl0HJhLa9niwjec38aZReTq6M+W81 CNiVN2xTzMkMamZJng76nWh7ugKy3wYv3xFR7NsvOwqS43FiEbYzGzvAXMllEqtgcpAa HLqQ== X-Gm-Message-State: AOJu0YxZN7SlPszphpPvj+2bCYphM/mZV7Sfzq20JM9s/QLrwcLkF74Z 0HVOOWh0wmjA9jZnpkv7vmvDcpzPH4uu8p0h4OCgDYrpzjba7+BhJ9i84zw5Zpa7G67hJ05WTBG YwCk= X-Gm-Gg: ASbGncsfS+/l3i+kBhAlsnnT9vFfWWTgyS+EPUsjryNC2CQ0wSNtM/UnycXcsp+/+ee sTljSwB+R1YZIH6+zZBMSanVTSiNiUvURWV37Qog0xundPMJsy91Bt0EXoLnPyT2lPg0ORh10t7 yCKIRPaicTsfE/1FrrrLW/IiWGHtnpxUTC40a4rBtwmu6/YKRbdUtoacSPYV9rtViAHd//Mv7pK KL19oVJpKXVb4jAE9wc9wLjrdCSQDXKCcaIyi1TZmK0cYRIdYzkYIscaUmcbaHGr61SRiXrmMfX MPw3QdWHTN99nnaHIzPystdYSXd75A3Kj80eDSjX4RM9rk3Lw0ySUAiKDbLq X-Received: by 2002:a05:600c:524c:b0:432:7c08:d0ff with SMTP id 5b1f17b1804b1-4389143768fmr316253995e9.23.1737821273389; Sat, 25 Jan 2025 08:07:53 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd501c38sm63952545e9.11.2025.01.25.08.07.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:07:52 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 24/24] cpus: Remove CPUClass::has_work() handler Date: Sat, 25 Jan 2025 17:05:52 +0100 Message-ID: <20250125160552.20546-25-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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 All handlers have been converted to SysemuCPUOps::has_work(). Remove CPUClass::has_work along with cpu_common_has_work() and simplify cpu_has_work(), making SysemuCPUOps::has_work handler mandatory. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 2 -- include/hw/core/sysemu-cpu-ops.h | 2 +- cpu-target.c | 4 ++++ hw/core/cpu-common.c | 6 ------ hw/core/cpu-system.c | 7 +------ 5 files changed, 6 insertions(+), 15 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index d64c823e768..2bcad4b16bf 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -104,7 +104,6 @@ struct SysemuCPUOps; * instantiatable CPU type. * @parse_features: Callback to parse command line arguments. * @reset_dump_flags: #CPUDumpFlags to use for reset logging. - * @has_work: Callback for checking if there is work to do. * @mmu_index: Callback for choosing softmmu mmu index; * may be used internally by memory_rw_debug without TCG. * @memory_rw_debug: Callback for GDB memory access. @@ -151,7 +150,6 @@ struct CPUClass { ObjectClass *(*class_by_name)(const char *cpu_model); void (*parse_features)(const char *typename, char *str, Error **errp); - bool (*has_work)(CPUState *cpu); int (*mmu_index)(CPUState *cpu, bool ifetch); int (*memory_rw_debug)(CPUState *cpu, vaddr addr, uint8_t *buf, int len, bool is_write); diff --git a/include/hw/core/sysemu-cpu-ops.h b/include/hw/core/sysemu-cpu-ops.h index dee8a62ca98..877892373f9 100644 --- a/include/hw/core/sysemu-cpu-ops.h +++ b/include/hw/core/sysemu-cpu-ops.h @@ -19,7 +19,7 @@ typedef struct SysemuCPUOps { /** * @has_work: Callback for checking if there is work to do. */ - bool (*has_work)(CPUState *cpu); + bool (*has_work)(CPUState *cpu); /* MANDATORY NON-NULL */ /** * @get_memory_mapping: Callback for obtaining the memory mappings. */ diff --git a/cpu-target.c b/cpu-target.c index 98e9e7cc4a1..15aa8afef55 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -217,6 +217,10 @@ void cpu_class_init_props(DeviceClass *dc) { #ifndef CONFIG_USER_ONLY ObjectClass *oc = OBJECT_CLASS(dc); + const CPUClass *cc = CPU_CLASS(OBJECT_CLASS(oc)); + + /* Check mandatory SysemuCPUOps handlers */ + g_assert(cc->sysemu_ops->has_work); /* * We can't use DEFINE_PROP_BOOL in the Property array for this diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index 886aa793c04..c933de1416c 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -134,11 +134,6 @@ static void cpu_common_reset_hold(Object *obj, ResetType type) cpu_exec_reset_hold(cpu); } -static bool cpu_common_has_work(CPUState *cs) -{ - return false; -} - ObjectClass *cpu_class_by_name(const char *typename, const char *cpu_model) { ObjectClass *oc; @@ -304,7 +299,6 @@ static void cpu_common_class_init(ObjectClass *klass, void *data) k->parse_features = cpu_common_parse_features; k->get_arch_id = cpu_common_get_arch_id; - k->has_work = cpu_common_has_work; k->gdb_read_register = cpu_common_gdb_read_register; k->gdb_write_register = cpu_common_gdb_write_register; set_bit(DEVICE_CATEGORY_CPU, dc->categories); diff --git a/hw/core/cpu-system.c b/hw/core/cpu-system.c index 7b16bda2250..32d09757169 100644 --- a/hw/core/cpu-system.c +++ b/hw/core/cpu-system.c @@ -25,12 +25,7 @@ bool cpu_has_work(CPUState *cpu) { - if (cpu->cc->sysemu_ops->has_work) { - return cpu->cc->sysemu_ops->has_work(cpu); - } - - g_assert(cpu->cc->has_work); - return cpu->cc->has_work(cpu); + return cpu->cc->sysemu_ops->has_work(cpu); } bool cpu_paging_enabled(const CPUState *cpu)