From patchwork Sat Jan 25 17:01:02 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: 859811 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1337636wrq; Sat, 25 Jan 2025 09:02:40 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVJ+F+Vhlc5rf3HcHyT/h8zdHB7PZtUh+NwZ3p/QopsexW7gM8TXJEH81Nmwn7xhbYw1Ap+Pw==@linaro.org X-Google-Smtp-Source: AGHT+IFjoq1MgvoYoCFIJEPMahqGFvomVY5ltnSB3oQePtaQcSJDU87o0mDetjxe2igiLqC5fblg X-Received: by 2002:a05:620a:4453:b0:7be:2a68:6d79 with SMTP id af79cd13be357-7be6321032cmr6494410785a.7.1737824560439; Sat, 25 Jan 2025 09:02:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824560; cv=none; d=google.com; s=arc-20240605; b=d4GMXvBGCirIJ02qJRSSn2ZIa2LH6D/ExT8sLRDFdXV1uxAp0vGJLs5D3lhEt8EIFH y2HQam3VLiulLi9rcqnNKYHSsDEyZ68izR98oBJDZKjBO7RzSj6PY5aIKK1hOVsrtjni 84UgH+JEIWmTNlA5I671UFQ4dqLS6TFHw20Ii3y9/sfhYrUkpdQdM+JLLvE76gXFvqAK AnCuwPJdvbbtyg5BrnyJQU4i0uz3r+jInlo4ohDLVJewpT72EBCT8WXhy1NLC1HA19YL jPGMwFhMMwxD5pCt+edU2SocrKnkxsZbgHJ5fPBdghwH9SrEqVNYvArteqISrabOkhCK gd6w== 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=L1Es76LgIubID0V/4s3s8L/za3CogFRcey9iuQRusj5U1D08ck03by5NO0TvNmDdoA Xmx2k6ByKBNQxc5b0JneNA1suoQwD+czNUNCdGiqlHpRBxixiZFDfGpAIu3pawq5/65Y J3VHoqNkKSrAYLyxvImg3/d6Ri2BbQTXhijLBIag4qKN0oS3C4GZAZjO5NNX6nRthZ96 ebqGxWnox2ONzHvK52tfZ+TDIUSvIy2htPaGqW5dY4Yy2VSftzYCYWnTj1zM35ksm6Ir rh17ZfBdaplnw1dGlruzI0jR3ILx4X4mDLnCK0z253fUe1Ql0I3k8TltgyNZnohzlpAP t5Qw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RutOTLh0; 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-7be9ae94823si590304085a.188.2025.01.25.09.02.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:02:40 -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=RutOTLh0; 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 1tbjXl-00071L-OK; Sat, 25 Jan 2025 12:02: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 1tbjXN-0006SM-B9 for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:01:47 -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 1tbjXJ-0000Ny-VH for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:01:36 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-436202dd7f6so35237635e9.0 for ; Sat, 25 Jan 2025 09:01:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824492; x=1738429292; 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=RutOTLh0DLQbhpzYUyhEN5Lb7Tv+DgtEGwJTX7fw/jVQ0ASnm+z9ZyEfItl/ncJFxt nhgZXUAjkSPnA4bGRL9lEjlZ3E5ZhmEP7G9U2TYhuvqYsIQyPd3RuH3EyNFkago9fpB3 l2BPEw4YCAVlldS1jxyM70U3JITshyVxXk7DYUd+cMe0/OLqVLaMevVeh11maoNlqM4V DeNaJ86LGaHh4ZY3hhKw4oFOu2TwlQtf5YL4lgj8XkbdhT9vy6WGRRNCzW5ApT+5N5My UXqBuBAxHJ91igtWqZL64MQPYf4WeAaIGRfnNsW1n23I9jKMnC4QUhF2DZZsnAt427t7 6znQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824492; x=1738429292; 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=m5u5RZkGSBw47eXGChQ0+GsP21RvC5hyaVoB+/jAvAL9yw51BZrSXXzH4Rbm0Go7xP pmIKYrqEuvYlnp/zygPUmdFGwpU28PKdF/ebXjf1aRXPOM9Gx6yll1lQycUSPnVmwzTS 6eerS7PAqvEa8St2cvnHJxDq34Z8CZXX2BvrGIU5w306hs7w1vphVANA7J51VUPB7yOi SKd0kRZVfNjy9ZczaH5oZVX7S4PU5FwELcCeD/gQ5fISAomZ3byN5R5GIXPMS7WKOTHQ pcM5hCODwf9eKBt46UjsOyHESHn1DVy/M25qW9tj+q2wBgM/SCSX14K0r56vpAU8czyI dpJA== X-Gm-Message-State: AOJu0YxAxRnYo82f9QhdbVYFcRDHzXZOnW0yN/bWVIXIWUR7iNfRtkjB wdy9rJbh8FAtiQczd2D48UJUA1eDKL/Cu1GJEJ8iJBFY7/Fu3PRMr0pqKx1r/kpaq8bU6CsUIdq otcs= X-Gm-Gg: ASbGnctZI8eHmljM8qaX4UTWalljbzbw3SjxnHp9cGkx3+c5xmNTpAK6Jpg3gRE6trq G91C9wRog//vvqVrJtXHpxnztl+IjZ833QfJauy/mUhF0HJkeVHNlzRtPpR/GKjmrslsEt+OHPl 8ssZK+9+Uau4diA+6t5mekXH7BrqcZv19jlTA+dZp0Lgm1jyXO075ZVK9sWY86icQQSgj20XJlB KqxeD4pzRLk0inEVG1WDsJw9g29qeIxGb0Rukfe0lwtb54faS+SYwkINGNfgj8vFR+4fIbmW2P1 rsbO92evM75xnkCUDLZv2KHo3KJMTWg+V7QkN+TuFOtb5RN9Lbvyc98= X-Received: by 2002:a5d:6d02:0:b0:385:e1a8:e28e with SMTP id ffacd0b85a97d-38bf56555a0mr33108088f8f.10.1737824491984; Sat, 25 Jan 2025 09:01:31 -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-38c2a176449sm6084870f8f.11.2025.01.25.09.01.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:01: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 v3 01/24] cpus: Restrict cpu_has_work() to system emulation Date: Sat, 25 Jan 2025 18:01:02 +0100 Message-ID: <20250125170125.32855-2-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-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 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 17:01:03 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: 859810 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1337526wrq; Sat, 25 Jan 2025 09:02:27 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWx+O5eGaCDaqwzZxKETiOEd/rFlqQ9a88vH5AtIoJT7VGJbJ6LY4MVADf/OoZLWZOo+6JFrA==@linaro.org X-Google-Smtp-Source: AGHT+IEC97xKFOfFWpABEb/dwq3wqCtXwhK2DMJDGjzsF4lU+18OFNITLIhsn1r8YAiDoUwKyGIg X-Received: by 2002:a05:6214:234e:b0:6d8:b733:47c with SMTP id 6a1803df08f44-6e1f9fea566mr198743336d6.22.1737824547052; Sat, 25 Jan 2025 09:02:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824547; cv=none; d=google.com; s=arc-20240605; b=Mts44nAiveI/3teZBdmEkWvuwoI4gLCV03+PFGwKXWBfSIg8bkn4WSaxPOMLKSW3GF YzbkVGywjSRhmQejCv4p0kpJhUsx9Abg2LkTevJxWWd86JdRgxkhRn35KAPN7CVakWCa 71gn2JjXx/rXVawSLfGu59x+RCHI1NVGF8acT06Zn5l7IOdyw2Rf5p8UVcierOHct/O0 rf6bMiW6FK0qr9q3nb6vI9iO6REhrRdy5vJqesjg5ORSMO4FeEsU9TmPvFiKYoXWR6GJ +FM/ND6wRRvf/xQBDSwmecPnHnVC4XH9+KGEKItahFX4ZxPldXLygkWqy1aR662K2OnT nCXg== 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=M/07L39CBIpMAk2G/jeuN8T4XVYmQQocDMnSTd8XCtfz4AkPqYv/cVUSCGCG3fMpVs TStuCwITnwzRAI6PmdMvPdS7zwjKfZOcXj7/Tj9qBVQspJUz4B2m0O1uUFZxsZ2Gl0u2 CQHP0KhkjDrP74yW8Pq4CeXCepakfB6EtbIkXYHl7T+Bn9mH4Nm3Ulw2amwcFIuHv90C 1d8tQPxYJQ9TayCKdGLzeK73cBVQNWWHwI55m7mGVPyOhBa7YKgOpp5Ee8BiwCnL2TRy OJth4Mb12Xvo0UorgTaRBE6WPcqzOkI3F1bnI6gm2IT075oYFbNWjgL+lSNDEY5q/IyG JDag==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kRgZgjHv; 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-6e205df707esi58861876d6.229.2025.01.25.09.02.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:02:27 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kRgZgjHv; 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 1tbjXq-0007Dn-Fz; Sat, 25 Jan 2025 12:02:06 -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 1tbjXR-0006Wd-8z for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:01:50 -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 1tbjXP-0000ON-1O for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:01:40 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4363dc916ceso26616915e9.0 for ; Sat, 25 Jan 2025 09:01:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824496; x=1738429296; 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=kRgZgjHvtEew7p+tTewGTgswcNCdsZ7DDZ88hrqehDn5/NKf+pR4V1lrjg3F2+6L1e qmdlCrXAbHJOQ8QDq7aDRmJjsyH87dxYjUbsWqMaM8tMIhe0px7wLpf23lR/FiJHdaUL pgYlg8Uh7wXsmoYHH6P2FLN9IdTQmFH4Ej6r9ZgBWUYAMk4cNiBPsjccufRgIQuzF1JS RzfSGGj0ZNSf1doryLwXVMpOjcPLtSgobh3L2GSgSLBxCm1750fT/120ITKx89ATiEYj qOspQGwTabZfgCmEZqKc3FJOpnRyVe8tNkJnjvyDHsVZ5KFNNsGNVrxiiInkGgRhIj7n CyWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824496; x=1738429296; 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=h751+q63hbtt3FZzDteGBW9um6SuyZB575GeAfMss/NHEG5A2/e1XW+NN/+xbtvpYN d5XHO2ipCuuC5u9/Se8zGYrWwSXs4VYQvlP8ZM5MS44ZSq1qnMuM6ko2u1nlLybY6Dfg URCPdR0FE92ErJYCgfZB15dGh1UCU9WwTvGpoRRA9SoLc81no9X5jVwC/jG1JPYapwVC paqaYWBGdL0/YCBkz3moVI4vWO1oTUdEIOFBx+M4CoJxiuMWmWe+mqFhV8BUjfZhYP4E qsfHCkmJYGBTD1KvldunTKiSuOA9pmPbWAm8D/81aCsnuVvZHHf6bK1XAV6omYIRE53n fORA== X-Gm-Message-State: AOJu0Yy0B8oAnnSLYS59mi7ahSr9/j0Nk7Erfa8m1OEZUznk5v+daTr3 LknuUju8tZSeCzpvOfyAvsSPyOBKb/6vlLDz2gjDexTkGCDCSSUw8SEp3SnU7A97vl85QGkksDS d9mE= X-Gm-Gg: ASbGncuyS3v9yyfU/N7JDsliZKpK5qbNJHVQO3s0lFA43PODMiqr1Ub0mr3wHiiCSRn KdpQ+fSPTBnyTrG6myKhPqo0G36eWLBdY6ucU8HssRbgbYDOVEFjWPoI2CfgoiOpI4CTHtAzAKC AMklwx4oGWXPSLo5vtkYqPqTHx5porkI+XrpMyaNoii+aUa33PzVze8Q2iTiYbWqH1pErniV0ZG sHty2C84oqGCRjau4SicB4SpgA/5FhpV1o2R5SfhPI2Z/YBrgDybeMyc1kgnmSF1lOBYNwk/xh5 D6uJkU5bE2+RZyD1d5iemyGlnXIoMH+5iSZg6wkEmnkN8ejXeAq4uWY= X-Received: by 2002:a05:600c:1c14:b0:434:fddf:5c06 with SMTP id 5b1f17b1804b1-438b8841d5amr105040825e9.1.1737824496440; Sat, 25 Jan 2025 09:01:36 -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-438bd4d2c0esm66485425e9.33.2025.01.25.09.01.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:01: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 v3 02/24] cpus: Un-inline cpu_has_work() Date: Sat, 25 Jan 2025 18:01:03 +0100 Message-ID: <20250125170125.32855-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-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 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 17:01:04 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: 859826 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1339404wrq; Sat, 25 Jan 2025 09:05:57 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV/65uiymKlc9C971JSh5/u456NsAhF3HPRdhdRX8yNhaH5YDUw5AMT47IssDFT/ONAD7QQQg==@linaro.org X-Google-Smtp-Source: AGHT+IF3WN9/BCtyg1mw1/hgAXjCfywjLti9jxhVbHIGDP5rD9Er43VwqO2chBsO5tdDleu8GS9X X-Received: by 2002:a05:620a:450e:b0:7b6:edd0:d754 with SMTP id af79cd13be357-7be631e6be7mr5724802285a.9.1737824757734; Sat, 25 Jan 2025 09:05:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824757; cv=none; d=google.com; s=arc-20240605; b=bv3EiKL5EVIVPtzr+Mam5LE+NYecAa0JwJCjtDaWmGM/hTCrCt8yB9d3GYTQP+2XF+ YyGbb2qnT8aX89q7uaJvjuq/hwecEoiNWcYwn0z3bRBdn2i/D7Qo3a0lpNkhqPQEpDWl MHp6Qul8HlsJNkSPUAAvIrsq878NBO6zAkH94xcoNiydHF/jjoyv9GMA6H08VxvcMp7z KYJGrbRsd69CncJUzwO9zCPoSkaD8A7ldk34yVuxNzpX75DmmJzSsUponZDTa5ttMcis mD9eaiSw/EXvj4MxVY7QM09mPSXRWnxQ7E+ontZeyzzdyRdyrqMDwvoiljL5aHuQlB0n Qaxg== 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=j8+uOrBQiMyvLogpLp/93j24igpIfzOz6chL5xTch7gLXRrO1PUkTzqMDBEtGt+L/O XTKyweElU1TKHn2UTdx5YO0SmpQ1XDV/CgnqzFUMplgGdBB/Rz1HhZ5VQsvfAMRlFTq6 9IZoLCco3xjN3ycYL01xS5Ocv66Ejd2GIifjyRRQLJHZj+WRzWc5JzN4GvTLHM0p/YdI TeMgoCbF45qnJWAKEBm/ob0RhHDCHxC3XRqQaWIMaswwOxt4WnSTE+eC4ab0V7sMYaFs gAkJ7v50T3OZbhiNOKjtIQRgrPNT5fWroA3YU77QPE8KtZIIfV1hKThJAFTyCBWduxEy IMyQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wZy8Owq5; 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-7be9af117bfsi600801685a.502.2025.01.25.09.05.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:05: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=wZy8Owq5; 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 1tbjXn-00078O-Q9; Sat, 25 Jan 2025 12:02:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tbjXU-0006Xn-Fn for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:01:50 -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 1tbjXS-0000P0-Sb for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:01:44 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-38a25d4b9d4so1671438f8f.0 for ; Sat, 25 Jan 2025 09:01:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824501; x=1738429301; 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=wZy8Owq52mP0TKE0CQlGHjgpraJ2htcoHyJPzXOfMa0W0zyRRN4pxX/NAVDsdeMJ56 0JIH5aMiRyNjH9EU1CsjwdFuEcQuQ4w17wSM49S3IcbLkhd8jxKuv7t0yDDLJB3PCpmP 2EEaU8TXlpfMm/DKbRat7tXra2HWpWZjeiWgW6mt2kFZexBAiBh7F6JjO9kz+rEykTX8 6sNjs0y7ECLV/Ak9paw9FFpvq6iC2g0otCszUVNIav/6pMCiMyLyCCaBOzRgnPF3G6al M5JR3Xv0Hwtn5JrGOBLL+cltH0keQnyh9t936gWbL68KJb8yDBsv9xdzrvDCMLQGz8sM 8VkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824501; x=1738429301; 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=mpfTJ/rNl21/V5rU1ZPvPfoaVrHcK2JEScIKJwWYbkwWQk6S60fJSq7T/vA2vpKF8u DXf0pygaV9HNcJ+fJfEcgI9LTkrUV1OLUdZZ/fBG+9xLqQKh7Scba7dxz+Zg6Afma3eV 1wf7D/IF9WWWeFfuZ/BwHi09T7dDmN3cm2DyhXocr/Xvjf3Vzo4DPQhMZoIJdVq6QF9t dSVToCOkGEhPJZSxv70hkIa3JPTmx7iBGebJMysit9TKtvk/ZJ1pCkR3HvvzqJJ539+q 7pTK8T6fsKpdVxFnhHHclGL3kXTqnhlHFVU8wisElX74gTF/a7E4NitAYjRdkDFP2V0R Z1zg== X-Gm-Message-State: AOJu0YxHCCmd79L4KylI6xDDSY/Jmuunim/Ty22rIyGw/Of6y03Uk9dk kYrp+UkluKVVhfd9rLL8G/ZvtIl1r8iN5rXCVN8hHQWxCHrU5AlwdKVoHZcxUdgk38iPBRn9zXg URug= X-Gm-Gg: ASbGncslgkijGVYcEb2AedeSLqx30a/fvRLG4fZQvw7HHmoxxvPtCufRBLv1b6/05CX uCPwmefqQ612QHf39r83R3hFNf2wi8b0QWeU1x5imIiW6LScWJDYnzuQDVSRRzyw8LzE2OfnslT YBZUHVJbyfe6D0Ys+QI7fRfA7ZHH7NNsElx4XVSOcLsaecCS8iYIpI7MNz7M26HBSsJyrCXCWmG gJy9JIML298eUYFxfO78J/1pPozZl2e1ty0VrNPnJsGJhYNfTmWNvsgmeOW/SnnwfH0Tf09Tzwt k+Rh73vJm5R2Lzl8bX10jsBhtkDxIiHq+8tXuZxy8HTvZZxDT0IOiac= X-Received: by 2002:a05:6000:1faa:b0:386:1cd3:8a0e with SMTP id ffacd0b85a97d-38bf57c034emr37672164f8f.48.1737824500973; Sat, 25 Jan 2025 09:01:40 -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-38c2a1bad92sm5991266f8f.61.2025.01.25.09.01.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:01:40 -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 v3 03/24] cpus: Introduce SysemuCPUOps::has_work() handler Date: Sat, 25 Jan 2025 18:01:04 +0100 Message-ID: <20250125170125.32855-4-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-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 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 17:01:05 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: 859824 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1339291wrq; Sat, 25 Jan 2025 09:05:42 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUbTMLuhWao38SGQOvF1qIl1vRpcBb12qo6qCNzUOL82RUUIFYyhAnFfGaZcDazJkVctaZjxg==@linaro.org X-Google-Smtp-Source: AGHT+IGCXZo4eZNOwxr/HkfDAkdLJ/0cWh8teWwuCEygYp9cay3aKLj9FWGXO2hMjZN4oLEYLwaI X-Received: by 2002:a05:6214:3006:b0:6d8:68a1:b7aa with SMTP id 6a1803df08f44-6e1b222f202mr562474066d6.28.1737824741932; Sat, 25 Jan 2025 09:05:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824741; cv=none; d=google.com; s=arc-20240605; b=YDEuqnhIxrOFFBtxNgQHbsYRHn00a3k0zoTjDwk+BdveZHIWeFNWarVFiIML9plZ9B ZQRCmURD2xYo/9IbLMf/pfwIM/0xGsvkyqYiYZm5GkPM4xAo2c7Qam0LLtR07LHAY/uu S+GKr+ymld5UnxuuUmEmONn3AzOIFaMLBMadkkjqAMCTSQSv2RFa5tsZqZx1hV+cQrw6 /XjYtDLdXUxNlxjlRWs7qiggx9azK2FLgXuatPTeMbqLe0c3dJEiqZxIzVjdlv2R/7IM VE0WqkAib2aNiDFp5pzV3oYAy9wJGuWrbp/B2UFvGYhjVmSflelM2f5faXHzlpkbaA7a Bexw== 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=j3qJVLW7eNwx6W6C8D360PpujUjGKw2F481AwbEgxtLsyndjdgM78zj2Zmr+gcCSFR lkmZIZcu+Ppqk8rcBAeBWdcKI/rXOrQftSFDlNtlA6g2Rf3N05U19w0KxaFN8zH3mawh jGA6HlpXar6ZawhcyqLp7KYdeDxY4erSFN+oNpBMlYMusQPBW4RC+wfsxU/xSOw3F1Sh GSh4gLM23GhL5whR+U9ajTgC+xMqDKmhiOpbrt7b9hfMjAs0Z/jpJ9VpItK/78XvImzt 4HqzafTqYXrez0gsYqlPW7Radcf+ZVyIjI5lgdCrFV8nKjnj2oohsgrjSHw9xgTH6DwX wD8Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VE034kJu; 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-6e2053649f8si51040606d6.133.2025.01.25.09.05.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:05: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=VE034kJu; 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 1tbjXn-00078K-Ow; Sat, 25 Jan 2025 12:02:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tbjXY-0006aQ-Py for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:01:50 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbjXX-0000PQ-Ar for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:01:48 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4361c705434so21793705e9.3 for ; Sat, 25 Jan 2025 09:01:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824505; x=1738429305; 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=VE034kJuU0KdJi/HKmm9P9Nvz5C/Pz8cX2DZQ3gwQxu/VM2aA20Bjoikf7BHveQGF6 0tXPuA7KbZxTA4i8uV4m9rTEGkzFhPnleaI6w+4q1fJVA9pGCsP12qAD/Rx9TwMsZWpL ab37T+FAlycV6rC2uPuwb3JevjNt8MCOzPvrjyiPldg7ZpJbO2DD/lIx3o3JkmtnWl5N nmpipy9evYNaP/QYuO8rXnDL5/eAJgmjZoQzsqQCrzEu7JfJE5hCJyk37tc8aPlE2662 6vb/1Of9zMMmxONu9T81fqJa0m7yofb6VBbKuXh0VzsfcTomumPcEVvdAzqn3Gg4njdg LOYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824505; x=1738429305; 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=mkVa1D5gw+tPlwRtxxfMhef+v79VDYbokmYxUtL+XkyXcXDkfaC19++PeisqDUMxHn rkl0x4vcXKt1XfYKt+KN/tdUA83QP8eNccprAtCzjNzS90OMMBa3LS++qxw2KzKV6Zn3 U5xU3mjwAG/ls8PGfgzTG3H/KVIBlfEQHarofYJN+/6TBV9Hp3wNoTxZmxq4yvqncKah BpBhgLb3rLBP9isQwoqSFcoFX0yKspFkpxdTLzUJJg15QroVGoAJOwdCRsswWOaLDbMW nShqHgUEzMoN+XTfcuhcGO9wfqxGmD0hm6/SmVSru5AmklKrFT0WjF9OaV6KAXX3btkd vsxQ== X-Gm-Message-State: AOJu0YxXeF0H/37hhPSktJjDrxtKTE/3RV/Xr2V1yfh1vdbPFcvHaWQN X1VyDCTAiXZ/ua1oLC47Fxr3V89KZucLY8fDh2FTMyYGm7lHFley5RIQISFL9TCifze44pcwd13 oWZE= X-Gm-Gg: ASbGncvkUDVhHA+XFPrFPS/8tQ8xrVHM36d/vOqGuWHRiFP5l3nYhETCGBToxuE/UpK S5Ju3z9nU/K9nssGweKEisN6hZbQpfq0IwMM6HZXtIZgbFi7K3yjir2Pnzfntz4zEMQI6t/2yci bCIv9EgVyGacNdB1m8Vzw/M2RrHs4otABe0cA/6j1lb55axfLUfBdwpeBLPBrRrjyi+nZSyt3IB lTRnk77wZ8HvsQIJNXBK0wWxey/iNd0lQ8q47Izib23XCJE5ymV7c+MuDPhTy8JnUbXLEQdl8zE bn3JQ/I1Z/WX0HedCMaw3ASk6X9qThVTbHsviT1FOHgxKy7HE3dlwYA= X-Received: by 2002:a05:600c:4511:b0:434:f871:1b96 with SMTP id 5b1f17b1804b1-438914388e5mr359128085e9.29.1737824505505; Sat, 25 Jan 2025 09:01:45 -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-438bd4fa57csm69991295e9.4.2025.01.25.09.01.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:01:45 -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 v3 04/24] target/alpha: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 18:01:05 +0100 Message-ID: <20250125170125.32855-5-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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 17:01:06 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: 859814 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1337968wrq; Sat, 25 Jan 2025 09:03:18 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUquckXqUsZAIOp2JDp2XuqlowkjpQb2CXs4WUlbkC1jKq9O+1P93e6hTIV+tABKgrxVdXYeg==@linaro.org X-Google-Smtp-Source: AGHT+IHeR4Htzn8y1xWmJh7GVwbm89sZtMWDIuXzkTDAFL8kSrVfzLUhhZgOsrfo1sS2E1mRexnN X-Received: by 2002:a05:620a:2588:b0:7b6:7970:6522 with SMTP id af79cd13be357-7be63279641mr5795205885a.40.1737824598565; Sat, 25 Jan 2025 09:03:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824598; cv=none; d=google.com; s=arc-20240605; b=TzFPwq5zNGCCz4w2s5JBgxwNju5itqFe0HlsMpZPmFrrG++7XrA3I/Fk3+Wjd9jbIg znkNdbPc1fDsdmVg5r9uU/cl0sSNOp2u/Jgn0VTs6RP6aJkoHsotQgV3ghGfmqSWVjJB LfC2p/DqKrJ3RRH0UYjeU85bIfZSEm3ynj0gGuLKUtkD1qD+1yjVJxc5XpCHe8i7T/fb sqw+Oz8lw2Fq1aOwO1DYuWBUeUaiI8sdnp2Jer9Y8ffyA4ciDlaMULKcHaStNzp2LTKr oT4t4rhXN/LwMyWgC5oeF6Ruo9owQxmCgpeijqBY1JCTdlFmEcA+Bnkhbcmfeb+WGWKT yS8A== 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=i19PIMHAmraLObW83hmRocyWyCLr8X07lCvSgeYlaAsYKNP3+jfYHdqrrgqK22RhZA 1rWttxB+6oVRPNoCPpseJhansYyhkTHvfkMToCjlebpC5FsT4rKPHVgyYn4oXNVSIKc5 M9PZYZYwOmPivXdbPF/Nqsx4CeuS+LJtFiUeE2L2Xs6US7y8CzzqZVDHol/EbrSturmb 9JSzGGMOboP2R7ZJQwas4ON9YrBw3Ix3bssUHrsAXZsJu2QOC8zzRiXAb8jkU7Isn3tb JLEfgTM7q41Q1IqZuhaKmTSG3vGIEKus4qLYRmIsk44b/YVUt3mAW7quQthZ14EnkFXf zRnQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hr6Rz8tu; 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-7be9ae823e7si524997485a.120.2025.01.25.09.03.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:03:18 -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=hr6Rz8tu; 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 1tbjY0-0007IZ-NK; Sat, 25 Jan 2025 12:02:18 -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 1tbjXe-0006d8-0K for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:01:55 -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 1tbjXc-0000Pu-HO for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:01:53 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-43618283d48so21877245e9.1 for ; Sat, 25 Jan 2025 09:01:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824511; x=1738429311; 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=hr6Rz8tuLVfDG6ZpyODy2j9ESmVfLqT0yKiFjTLLPgFXC9rTnH5x/GRmOkIVhKfQuB fK0e1TiskP+AofQbitYIp8m5wti7ouMpzVup+fGs4RDsOMayB0nuPWMSuccgBZAAmlbM Ln4QnHIF1nlzU8VHETvGERLOwxzDobK4ixgGJS3g6k1iqocOOheGy7IUvK5cutsEnU7p Zv1J/bld+dwV28tY3sYj8pxgWtklGkD5XbBoNDmXp4jmRyYOfj9qSJzXXq1592I/Acsh rgYM3NqhDVMmkByt9JoPGqj5KQuWzF7P7rXLX951fGByperJ+OA49iW6Lne4eK9M1EGY Bq1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824511; x=1738429311; 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=eILC25rWmviawmfmMQvQ0bnPS2XfoqOcKPjDnFmo0jZODrcM1j5v80dwohg2Oiv0+J kei+LXWNyzM2/3GFSYpZauW381q35uQaVLCaxEhJ0CoduPUpNa8FQ3PdwTRzw0J+f+if 52W3dnilbbC6KuPLp18uDB8wVFmzRNXQdn+PRvi4FHLp17nQXcD5z+PBi7AqmdU7/izu Z9sN69vEdRt9peFRK5P0ERHh9NVxIWsd2obM1madLRLRTe76XjOg2UyIYiLYO1F3Wv2U WqHdLDy6uHnW0WfZXJQUvPM3KC3HKaruJiEVvg4A2UuIDGwSbw2LSYmSjNrS9ynG6dq9 vE4g== X-Gm-Message-State: AOJu0YwzXkVOQkF48RvF15EyQ5SoYKvLM1hDGVg/0KdbdNBci0gxg/iy VjYG1YkVYsOQTSnCNXXE1lZHqjV3qz5vkY2vjyVj94rCcBDIft53bnmMph8d1yqtYtvuFurYTSL dFBw= X-Gm-Gg: ASbGncuugKBwugZdezrxwR5o739R1Auk3wfptA9P4CnpQvU+EdDnyXLzLkDbEzCWcBD wcLvuzMucLA4ZU4tVgyfLd0zI3o/INXPINho61lTMIbFC2EeuPkG1nToiLqiKlQzP3y5Nz78D4/ CDKjmG4WwuaSJTANdvH+Mo20+XXS03Ugirv6AQgOc41r7PJTp3VTLoFtHTLigXvUIlfBr795AP3 r7DDR0fHKxr+XhE5Vx4KFaX5+5Ny9h0/DLHXKel5bKQ6ixbUMEbO6yhEnbRfDkCeEAcJSxCHrtD 4B1nt4xArgyiVrEWIk+Y+deSOuOjBvnzXF3lC9sM/4gp9DxnwIGEj7Mu5g5FBnrf0w== X-Received: by 2002:a05:600c:384a:b0:431:6153:a258 with SMTP id 5b1f17b1804b1-438913db2c3mr342701525e9.13.1737824510730; Sat, 25 Jan 2025 09:01:50 -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-438bd502007sm66229665e9.14.2025.01.25.09.01.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:01:50 -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 v3 05/24] target/arm: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 18:01:06 +0100 Message-ID: <20250125170125.32855-6-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-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/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 17:01:07 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: 859830 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1340281wrq; Sat, 25 Jan 2025 09:07:29 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVtI924gChMOctJNmrh6pBesix/Y361OevR1+9FagcOxDo978HSGIuw/wUvB6gDtE/guPII8Q==@linaro.org X-Google-Smtp-Source: AGHT+IGV2MnFOnopcrTU/D92qBa2oderk/S/xLNZO4qCCMvnpQ3xW95VoidGDe7YUi4UJEkh7ARD X-Received: by 2002:a05:6122:2389:b0:50d:a31c:678c with SMTP id 71dfb90a1353d-51d51b65c8fmr31219358e0c.2.1737824849351; Sat, 25 Jan 2025 09:07:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824849; cv=none; d=google.com; s=arc-20240605; b=ZLh7b9OUqHjwSSs594QsuUmT9ynMeW7u1mk4+XErWnC6o8EQM6mSW8jvxfPm274AXa 9DYa7BKKJ5LBC/UabLJACL+n1R2r3+Ia+vYonTacfWFrrUh6WHGClntZa44nL3PyHryj 8P7Wf9PKI21E/aGbJZYaM+TbdLra2KKP+CcsCqPikoGu4x+BjqRlpWMbARxyEUIBt9Rz JH/iwOg8QYNOipQWbwU+quSpT7XLpGtjVIx27UasZuYMh0cn8MsqqiJ1Bo8+qM1fdKLF +h9FBGiCGz6GJShKyJ+R17D83WePB0znxrmn72nw1UK+mg5iSy6H8lC5rtv2R+CR/sjI bRWQ== 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=MtZCjurLzd8l7vgHKEhb1++tqv9MxCxxfmOc8jrZzRj6D9LZBD1MXQAuNeAW/b49vY XcuadpzfMiTuMdp53j7HgTUQernAhrdUkD0zgNBk+k2GE1UHBtWtdS9qmDn+tkMnY719 D1jZVrRkXazlnQPCdWWRQzoTUgoL6B93wGexVl3JjO0hp0bCELGA12Je0Nv0wUtTyGOu qJCUB89cLZVULvRMeyPjXco4DDW0sgD9Emn40ePBxaLMYFXXgu/j+O/f69qRLmq42MHp L2rXB6KFQpRNu6gVJmD8kYFBPR2s7aoBB4om5rgx7hmVaTy3kCCWX7qIhjPkjbDf/w+r Td2Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e1Tc8tNo; 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 71dfb90a1353d-51e4ea7d753si1979471e0c.78.2025.01.25.09.07.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:07:29 -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=e1Tc8tNo; 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 1tbjYD-0007co-D0; Sat, 25 Jan 2025 12:02:29 -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 1tbjXj-0006pJ-Jl for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:01:59 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbjXi-0000Qg-18 for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:01:59 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-38a88ba968aso3056584f8f.3 for ; Sat, 25 Jan 2025 09:01:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824516; x=1738429316; 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=e1Tc8tNoOTeCnd/u9/HFJDTsybTDnHn/yyGJbMHwFb+lNdKPUKWcAC3bCvfuoxldZ4 aJiZK3JaLwFDBu8McLN/YsJAhFV/HM8OTZPa7h4ZsOvvxPUned4IF56KD3YMRwTIObk/ R3O/cvPHPE8x1znH5BN/TY69luo2/rt7+wtot+ues91YaUKUitFnMguJ9mR7UdsNEl6H Uey+ehrV9O8nG1me9bZvBBKRza8uBFkB0xUiAVdWR4Dejg7Sd5PtFLR+3P64O4nbHNWY T86fpKADdcGUCIWI+7KbpJQSfNL3ETtkYrlxuU1z1dMKdqHGQqOAvFM2qmqh83pObdQ+ 8X9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824516; x=1738429316; 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=vEU+Nkp0vSKL8wfpBWT1R4pmelq5dxpZO2MTpih01hfA/5UYW+Son9GQbGRFA52vTd VufKXXmvi5FKEZ9pdknR+jY/Sjbxow/fEfYB0nUZNRAYCWxuJoBwZl9rWNIN4ZPz1gH5 c78t7ZYpNS1bWse3PLPxJp3lsnr3HjAMVbx9pLXvVuFsH8wCAAu3n3gUfqqD5NQ+Ku+A fZ2ssbicnnz2Ot4DJMKftpFjkiWnI11MxYuw444Vz09NCZx34RNk1p7w62lmMD7ddL+r 3gj82Mg/g0Si8QWzTJfolbjWhRQopQT8qqlAs2dW4nfEUdEUPxma+gKmOrFwppkhLID/ bZ4w== X-Gm-Message-State: AOJu0YwZSQzw7ddukdE1rG87iUn2bjXeRusDnrv0RrpLw2NY5YL/2RXN Sw2/Mhu6tRGco09iECs/QEB1OmRgzOfR2Ck3h+rH2kjiwOHN9HYTBaH2ByygV91EuUrvP2/u1Nt NlrM= X-Gm-Gg: ASbGncuNQldbt1YhZ9Bd96kn40vTPl7uY5GAo8QUracxXvECFq/cBMzlNg0ZhafoZ2o Aj0EPxrxRSDftn3I/B5jQnq/RYon7/DUwdUkM7Rla19ALXl8YxP0gZq4RXNegK6/cDJ8hvkXwGI XBMf217ZfFB8FJ8qknyfwcPlJCgDukWSKETIHEF8CjZTkwZW4wRygnmCM2w1k+u36aVzGGEE07+ lesbn+3pXbHs96Y/QaQ2UWGvkHIa16fGCm9xdC6zFqLfDDBlLNFWW0jBZGpqOPkOgVBduZvmxMM nsxK5+N95+cGnlbmCGKKakdLHq/6YMkjQq+xHZGIW8iJPH2eZM+Pj1g= X-Received: by 2002:a5d:6d0c:0:b0:385:e88a:7037 with SMTP id ffacd0b85a97d-38bf564966fmr33455673f8f.6.1737824516047; Sat, 25 Jan 2025 09:01:56 -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-38c2a188d5dsm6196482f8f.55.2025.01.25.09.01.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:01:54 -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 v3 06/24] target/avr: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 18:01:07 +0100 Message-ID: <20250125170125.32855-7-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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 17:01:08 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: 859819 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1338755wrq; Sat, 25 Jan 2025 09:04:39 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXLizwp1etuNCoiKfqUhA/tEPgtFgPUEzCC9tTJgGTC/NTyicCsG1OiHf0kDBuwa5tSlammkQ==@linaro.org X-Google-Smtp-Source: AGHT+IH9RW/2jL/WpJIwj3OtBjKBIW8k1ZjYiUc0mvrcNAnX+P7O0fH7jIowACfvPx+0dhljvEeC X-Received: by 2002:a05:6122:2211:b0:51c:c23e:8cd4 with SMTP id 71dfb90a1353d-51d592ba2admr31039806e0c.4.1737824677881; Sat, 25 Jan 2025 09:04:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824677; cv=none; d=google.com; s=arc-20240605; b=bvzloGCdt2Bq2KxkR/JeGKhiwut1a3/Arwfwp1mLbjJbzTt+/rN6z+gJvFVI8hHrKc px9aA04ldkrBes1aJ7t4/lRgevwOrB64o1SDmzU6YqIgKjcMb5PZu06k/iLwBdFPfFeu eDyrQgexFdI34UrqW559z9NxyePM3H6f+bY+WTckBk8sbWSSSSoXGJ15K8wZoY3OI0hc HzB3D+KVOIEUZg5Eu8NVLu2GZI3We2t2UhZfiD2KfFLR+DAxzZpsOkHbIamnDU2AwIiK 4TUe3mTli1jsAPJCxqb8Os+NqYnG8/MqanW24ISws+KW8iED8lv+BAOX2SXozTJvbcpA mOjw== 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=XJTLGWKxiPOKA+7JiQ33mkRAnfJqLdA/+9pZQy72NJ+CiR6NsCZjHkVk0UMPfCTMoe YPmWG34cvz4mNWCMmh56tMNd7vvt1CSuamOCbc/yDH1L9g58WmJAErJckA9sVkmLhJel flAG4YrH0NOi2WvHNBxBJ1LwVjfvs5sPFfqEvy9IrMAp2MpYvuJkhDx9WZg6vBJ/OBLI gsy32br3Q7x1UucuSlPGCJPpv+SrFi1G6rOXE5E+SlJtHtnVGhg8Jn5dv9iUSd8J7QWc UzCfFrCdLQqTkU/99DZ3PyFm0/JMy8fmQ7C4LvvVpSisESqVmg1Nf1FZ+hHQyoNJ7zTh GavA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VFmYUg38; 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 71dfb90a1353d-51e4ec4356asi1596015e0c.149.2025.01.25.09.04.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:04:37 -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=VFmYUg38; 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 1tbjYH-0007lm-AA; Sat, 25 Jan 2025 12:02:33 -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 1tbjXo-0007BC-Im for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:04 -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 1tbjXn-0000S0-2e for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:04 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-436345cc17bso21975075e9.0 for ; Sat, 25 Jan 2025 09:02:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824521; x=1738429321; 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=VFmYUg38jmF1TBUogO9Xxe/A4h3xM4IWJXlSsauLI2mOg04DA9jhLPA0LeDDArj/sJ EPLyJUar/HsmYBmb2BUHDC+1iu5/esXMNottn6bVNAkAARTIuEu8CStkb1C3TkInoiw+ OUGzW8cbgTVQI2CzPXu6W8sRy+o81Qp3z8bwtp3VuWs9EaF7xERaSPVW+/3VYglSseib WwFmHKlU6xcM9hQFNoljcQbz58RabZ2L/PEq5f8FNgphyffxtiH38g4dMYGHMgIQIQ0r 3+771QHNuXT+leNSxB5j6ykNVHEW4HtfZgmnCRcYwtODzEc7LGGDJpfE/T4ZkA5IgbAk eDhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824521; x=1738429321; 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=RxsDpYG3ElvBuBIg/eh7lolUzWu0sm/TmuzBsURrcqcIPoB+MxwCQz+f9Max9ygAAi aOw1ZzZ3UBZU0Qyslh/xwV/LUNoBsSctJHnf5zr6dAWNT7ju84le0p1kB1Q8YrFK5/by L/TuMdEKMsK0Nf455t4ZW0N3QdccbSuGbzwJvxCJrH8Hybl/wAYYix64L9HPTxdTnfLs AvhgkqKZe3Nhqcwx7ypIcr7aA+zM+OduOZ3Blok6ISC1lc+I0csHJ7KkhkLZgQgA9oY2 2RHqG3MacQduZP+0nzvCqRd1+fweeUZOyr32z8g+EuODXe/ePiX0+fAEAjIzsGpt1FJV xZ4A== X-Gm-Message-State: AOJu0YzFtJWW7q3IhGDEgdYNYoRBREFkQa1KwKlMmgYZw4tw9ZnF1CCF JYx7bvci+vIWV7EEQYjOZKjjPOQIqvqsQ5WG5+K2gb+d+jNOeENQfNYJRBhjx2DmKpz5ateqJQA mqRE= X-Gm-Gg: ASbGncvKQUU2Q2yRb6HGD4Yl4bcbIp/YHcpbOJmmOIH3mMk05XZn9eKCQGyXNJj2jTu Uhj8rWoDBjtI0UZUtl/DF+NqaFIrGbQ/Wt/lhZ1Thsn0A8oQztF2RLSGgjDWSU/bF2RRe2GcFb7 rHxG90rR/EdaqXMCQY5XnvkLEQJfL9scllbRLhgf9NabEEwvZ0kTffvqyFCKQrwV6yLP7QWN5nN AaHrk0ztdehIu1PId/XP7tPJHtEspmmexzEjd2oKUZqY5U4P3sxjX9DxuPlxClGGGjBE3G0m9To c3lnUGQTDJC/S2gBQB6/HjAIRLqLzpPqbizCTzw0GBEIdf1Q9skEpEU= X-Received: by 2002:a05:600c:3593:b0:431:55c1:f440 with SMTP id 5b1f17b1804b1-4389144eea8mr387781635e9.30.1737824521412; Sat, 25 Jan 2025 09:02:01 -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-438b16ff48esm93486685e9.0.2025.01.25.09.01.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:02:00 -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 v3 07/24] target/hexagon: Remove CPUClass:has_work() handler Date: Sat, 25 Jan 2025 18:01:08 +0100 Message-ID: <20250125170125.32855-8-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-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 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 17:01:09 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: 859818 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1338747wrq; Sat, 25 Jan 2025 09:04:38 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUZ9umzq6YOSLhz2ucUagyZmsWtLGrPQe31k7EOhNMslY70Mh8/NC4OY40W7k2bhk0SvjlUmw==@linaro.org X-Google-Smtp-Source: AGHT+IHJyrLyIJXdRY20FgvpPkj8zsm/YWZRJ4WVCsBGBUdLZRSxek2bYMYAktrKwrDnJ9Xg0RiQ X-Received: by 2002:a05:6122:338b:b0:516:230b:eec with SMTP id 71dfb90a1353d-51d5b265b25mr31349298e0c.5.1737824678456; Sat, 25 Jan 2025 09:04:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824678; cv=none; d=google.com; s=arc-20240605; b=lSUcgSyHOqn8hmUUUTz+K4s+/Txzp4sIq23rSS0pMHgjGwAl7a0FezGn/+RA7KmNuY 8JWy4RI6pjG75TUPiBVgtDbNjVKME1d5aLWfgGgi7j1X7VzcH0lmHJ+yfPAiAVo5SVag 00tApN5UYAR/EEQwG8i/iLMNfM5JGY9akwTqItKdVogOye9AE0F4XdLZONi9EhMsBsSm k6Iw1czlMFHqpqc508kXkrtvYvQa3h8Fo82HE76wxuc+Mdu6yEWAQrLHgoX7QV2RLkAW f3Ur/aXK8d9b8m1ckW4RTocXuC17+NHt99m2RfyhKt1pJiZgWt8S+59HOX0Y3/GN8qx6 oi2g== 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=fSj10H77wlEveY7dNcpXu72DNdROS3DeZ4uokKnAl73J60SPPlsaQrMblwpgXl1NuZ /JcOKAh3wzNfp9n2QqWwGF9pZs5dmc49QOJuos6C9068eeDxOW5OHVq4fSBQpDjd0X/p vdyrTqCXuvZN0Ea2WWJygDdSr1Jq/1z/EYXhg0aWLJzXF17bjngeZdf7+AU6nHlauiLk JkDR9bp9Sln7GyQvuqOOUGO2ZM7hqTfdz0MKp2iGW09zIh9Xj9kMNRfbZV1XHxdfy4NR VM2k54lIsGDmzlASl826y58MBUxV/0y1AWpKqzaGKWl3zgBeAcg3VZfkOkmoyBGc90et KQ6w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="v/Zyj3jT"; 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 71dfb90a1353d-51e4ec8801esi2029773e0c.215.2025.01.25.09.04.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:04: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="v/Zyj3jT"; 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 1tbjYD-0007dd-Dw; Sat, 25 Jan 2025 12:02:29 -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 1tbjXt-0007JP-HD for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:14 -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 1tbjXs-0000T1-1i for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:09 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-43618283d48so21877965e9.1 for ; Sat, 25 Jan 2025 09:02:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824526; x=1738429326; 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=v/Zyj3jTbCsDKDzOfkzaoqUgRVOKkSLE6rmXrfJJBQYwZ9LfO2ZiLb0vRZoynvt7xZ ZtPiEkDi7g7zfRN6wRLAb8tkm+JP4cQY+X4BuVl26/F8UYJe5/O6d01VCPLEYAWmtzv2 JjiT9AE+WTSwI4hAY5OzoLac7vIvV5QIDbkpeBYQkjRpmMASOpBhyAC6kXuCjkqBsePn fXzTWRL3DdvR+FizQsIlWguU4lnl48PMiFdmO9sap2Jd09TYlQQkfpDf4co0PKMj/mmA YvUOBSzWrpDHStNHsTQLRyCtUs+1ptOzv0vTGG9GZ4urz9ZIFn7kwe0zrM6tvT0Wc8g0 uMeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824526; x=1738429326; 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=tqbCJASGiEkkm6D6dFjSXIkxRRBZ9nWC3P1cluA9gL8UiQhhbRStf2jkZjM/JEFtz2 Z51GDvBUZLeDsvZ7E2nXBQpJCc44TY6cFp/nHUl2A1BnY56Ls42eOHb4jfSWfqkHym44 hpzk1YI6xUWKLJU+py1kr0T+q+lFi4ahZ3pmZEC7peTrgymLvsV/MeYa6co90UauRM/o a4Iud+Y6A/yj7I3RRhvadjy6oURFsVL2iPVzAN3c2sJ86uVmymW7U6C+HZDqrRMtKldo e21VThACojbrSAIeBLQzMftuEjYxCcyxezI1zQVJeeiC7XQ7rGKIWhsrvVFkQx4scC/N 7MfA== X-Gm-Message-State: AOJu0Yy+ET/fOHktQbk+gr3bWKNI3SW7x37Pf+RuWGRTyBCOdw0pbSW/ jLF2eNLtfD29LRK45/aTW5pE5yQAf7DOVP+7ZMS21CoB+ipowas5+/jsRL/5AhX9952k3rvHxoD 29Ao= X-Gm-Gg: ASbGnctekY4S7tkrcUHD75QWthg0+2EY7wZ7HNAiGvSq4DOnCJq4EtquOqjs5sma6Mr YY9soQWagyJ0WB70p35etu62LsStFI3EEtOuiTWcwpzxe2tuwuI7uLz5rpduex+CNwB6VbE9I+y DP7EcgNRMmCF7QMdBhc6pJ8vG2jA5UhwEc0+5MQvSyHZfwSt4/Cj+UZfDlFrsejGAqi/6hSNABR f//Wq6VIf/f8u+RuF0NfvFJ/dq9jNLpE9tvJWRjfOuUKq1STY0bK9KPPvWZalxXEVi9K/yjEF6x pv6EKbemz2j539+x6EcLTfL3o4b/Qy6rfevz4y94uwJWrZeOu3dxPo4= X-Received: by 2002:adf:f584:0:b0:38b:f3f4:57af with SMTP id ffacd0b85a97d-38bf57b4090mr31055140f8f.35.1737824526020; Sat, 25 Jan 2025 09:02:06 -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-38c2a17d6e2sm5962579f8f.23.2025.01.25.09.02.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:02:05 -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 v3 08/24] target/hppa: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 18:01:09 +0100 Message-ID: <20250125170125.32855-9-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-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/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 17:01:10 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: 859820 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1338956wrq; Sat, 25 Jan 2025 09:05:06 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWpnUsQq8oYH3jKkMHLllvuTrYarGkOeLqG8QhSEoxPxkdpjyvBnkDS20xjtN+L8oC+UL/JyQ==@linaro.org X-Google-Smtp-Source: AGHT+IFlQUEuV3LlpZyxZeoatIX85yP3dAOwnoCQFh3khP+NTORG5wKrWmA45i29gmzH67Z2LdZF X-Received: by 2002:a05:620a:24c4:b0:7b6:d026:293 with SMTP id af79cd13be357-7be63210362mr5654873785a.9.1737824706174; Sat, 25 Jan 2025 09:05:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824706; cv=none; d=google.com; s=arc-20240605; b=eomXA3B9gkML2yOpH/7CiiXxzxeVe/2yC8E2MaNJze0RlDMFefWXlX8PLFqHDZSVYy 1mz9Yx7QcrrFtQgJwgZDCAqH9BfA50FoSWmqQ8CKWtZrLALLTR0uIz5ekiUdmPNTZZcj H/U4AX9dCaz5RU0JVg5xU6B1k7vC+WnM9HpqgzT1ULqZI4ym1DIfKNOlIxPeTjRAC5Az BIS8XrYyH8uAeHJpi0V7BBute41E0OZQq/i30DMx5/lgxV3wKXz6pxCJHHeXbkiwpelf cMKG4E3SCoRnAX8Rr4temDlnGS3PJ7oM6cZJZOGH5o1M6yTC642I2J/AifaIJo10nffe K6og== 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=SMDhHcm8s/UyxWKPwjUnYjY6qXtsZx3xcpYi5toJlOqpvULeYTFGh7B7sqAYeBYasC C5IPDcsuLflF+Ky9+kqfHUeN+JybC2tPTHcCgUr5vyGaIM86VUIy425iSP0nUA/hSwXB h/jNjZ41PeNd+am8yO/eEXOtSs3DHOlzhd/tr5T9ltnC9//4ZdVntbEomCRJtRefcol7 0fj81VSfhJeBOPNlF9qSoWEsM4OaN8rvh3yfwywhuwIGC6qwjvUobZCsMa3bgeSwjf11 iggtrZErdjdyPi3nCa5fXY0AwVvrDkNpVQE6krxPISlt4q15ntFsPGhGrGw6PlvjmFmN 7j3w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TKztmODi; 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-7be9aeee389si528743185a.371.2025.01.25.09.05.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:05:06 -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=TKztmODi; 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 1tbjYF-0007jT-Bp; Sat, 25 Jan 2025 12:02:31 -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 1tbjXz-0007Ld-Ig for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:16 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbjXx-0000U8-VF for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:15 -0500 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-38634c35129so2799435f8f.3 for ; Sat, 25 Jan 2025 09:02:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824532; x=1738429332; 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=TKztmODiVcQDk0CNVWfLKxXA5jb137SdOmHrZduqjKQ5uO1BfmLylYj2nyPmSx7NgT /YIelJeW9B6NhEAFQ2wvbw/+P/fBNX+kXL/+S216Iuojo9QqsNTWZm9OPW3331Z36j6D dDvCdReirJzOBxEAqlaLqQz3VLgTVklDCDq73Cr6k4UZGBlCSFOt+IK289eebi0MMdIy 1xOipwsUeB6X/KKg3l/mKqY6gg90dzQhOnrtnR8dtMfVgV4faZ7T0U1e98df1x3VnihW o8ilsxNQwRRzFznl2QRGJ9bJqLe3jRrL0O0S466qJS5fJ4NQ6qbF2+ggxXIV8/pKrchR aTjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824532; x=1738429332; 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=kaBxfbKTrtBXmQZ1u82l3Rw8Gi4Vnprzg+GWuPLJg7HshcZyuhcXUq2cc2jFbdAayC D7zHO3nXrBlkJJjyRVkJ8DbG9qxd+6CzJ23Bi9Xp5bFzFax7ooVo2RLEnfIU7u/D78x8 2WzNwNvwfhN73Li8d+XJWmmsoqLIV/UX9/5KSmqeMUBblHCrz7AYX2QbEDzQV+pC6ugW hIvf0QZm4kEpIDyvT007BrrLrqjDl1pYs2DsjLITCk9JDGLwOT0xgk9NWRsmvVbH9Y/s cbxNJlUWvwiE/lLxRU5IyMM+cmsETTbDvZL+rF+LHA77Ar4bXpA9Q6XF5xynoj6LYzXl JSog== X-Gm-Message-State: AOJu0YwTt7gXXI3JeZtVGox9jcy/o7lLD4G8D98p7cgpJnTuz+zi4uwq xhL8MwLDyjCZtyu00dY6MCxZbJn4xSGd21CKRCGy2U9SWoL1FMz4BbFsnpiOg+pen38GrwEw94P INuQ= X-Gm-Gg: ASbGncsm88TTBm9TaBnlsWXpqv55uCuXxkcSw56g+mSiyM7pucyDOpiERWo9q45uzvJ ZFCm9c1i6vvl4JoXFPVPQWr0VXxm7t8mwrHcbZiMPqbOlX0zad0GDwFor27X+x8tqIwkC794aJY yj4oDhztvIVuGzxbAGrQwBt8DxvZrDC56RJJlr4IZ3H3XF5W3jRrXOn8udalzUrQN4PJZo+fQC6 kro5XpGLsVJO2g4BZPMenPkTAEOS1UKNoqNLc4Q+nj0fz+ZweuqJDPir/trjd99g6iuzyE8y/fr anN40tzRdKFAgCbOm8x9V5KtpjrQNKgaF88c7hLZNd+otnXnyLK24PI= X-Received: by 2002:a05:6000:156c:b0:385:eb85:f111 with SMTP id ffacd0b85a97d-38bf577f703mr38489428f8f.14.1737824530481; Sat, 25 Jan 2025 09:02: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 ffacd0b85a97d-38c2a1bb057sm6050952f8f.62.2025.01.25.09.02.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:02:10 -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 v3 09/24] target/i386: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 18:01:10 +0100 Message-ID: <20250125170125.32855-10-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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 17:01:11 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: 859823 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1339154wrq; Sat, 25 Jan 2025 09:05:28 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUB2lvwQcJPpK62UbOgCgFH1OFRURUc52cPpi5ilGOZgWvTe83SiJV8Wb7xsfxxp3nWRUJw+g==@linaro.org X-Google-Smtp-Source: AGHT+IGFa0zVi7wRPbMT1+IwSDvvDKh/RGE6nMlFbDZCOSnDUKUuL2EzQzO2creJDUrseHYsI0AD X-Received: by 2002:a05:6122:8c3:b0:518:89d9:dd99 with SMTP id 71dfb90a1353d-51d5a126876mr32146247e0c.3.1737824728451; Sat, 25 Jan 2025 09:05:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824728; cv=none; d=google.com; s=arc-20240605; b=QyyNYzKT8YvdWC5Y2SIZDYwXaBS+krQQ8nMbhZW+27copAVq52+uAia4F+gReQANPC KF1DGSlLTZQNgnGjP7HwCLELTr7pvnTZsyNq0xC7RzJ/ENbVht4L1dzbt3MGniXZPUCH 6KdxnJQ1DY2U3ZULwOEUhhVpqmBnslu8QZyc1x0fc4ijTWS756uTMcReU6i4Te81+OIK 9/AQZDCCIkFLkTj1LY1YeD6uFpgOA4YZjOtKrMKRjRE6/NYtzxFmAo2yRojI+ZDML+aR JzfF4MLT4st7RiYxM1SSO10f0ZiALWtr7w9k9u/QGS+aUwmkL+cLOSVxaqKVYm1YnByF D3pQ== 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=A7GYzeFLUeKBUn+i+Y81rEz9Acyi7rP6+KdWRX4J3fN0fNoyOx8gMli82JBNRbLSND Gv1KrY120HBYeCpthgeHSg6dYdpHeT2Gfp6ttjB/cPuMrRFP0M3DFi1liNv4X8lY9riV pml2eSLdOrbUIRqS3EVadQGgXawFX/YgXTU/+NsIY5b1CuSCmibopAM9TdmapH3LxD9A bJn5lThW+0+GkHuP3Nq7Z0Z62H4AK9Ar3F9vU0dWxPECX0rNFvs7egZC/YTgk1ZAnGEj h93FKHpgUa9esA0hxVFLwUmgMckNXPYSOV7cfHaWoXMXThmDztoMY9s/2Yvmnb5vcEZp fBUA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H4P+IGCY; 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 71dfb90a1353d-51e4ea3d8edsi2026511e0c.16.2025.01.25.09.05.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:05:28 -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=H4P+IGCY; 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 1tbjYF-0007jJ-BD; Sat, 25 Jan 2025 12:02:31 -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 1tbjY3-0007Ns-0a for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:22 -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 1tbjY1-0000Ub-2D for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:18 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-38633b5dbcfso3546573f8f.2 for ; Sat, 25 Jan 2025 09:02:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824535; x=1738429335; 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=H4P+IGCYykG0iClof5eIR9TPZIMz5MZD5+P6gdixBeKm0FeMrlg1lQCR2rl2yuHzQv LbiphyFBGK3xV/A35+QJuUCg9kB9P88HPE1QuKNpGBDbTCKZgy/mhBRvW1UUUMIkELLO SR3/+88PrjtJ2jhKGcMVPaYwnio4ABesdr83I1h79oB/BBWgXBSPafwX+he4Q4ENtWJq chN9nAjOGekZZV9F5daV04fGG9SajCn/DrcmwRfSDcMzdmYyxhJIbLQzKzRnYEXzgXtL Y5iwFWbr1AIOzUylrgC/axzbfx90voaTiWXYgRF6fXTzs1/GcQ9GkdLYxZ0MFvKCVJAn F1cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824535; x=1738429335; 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=hLDZm6LWfWKa8p5N1Z+8paUCP9AgGkbVyXUp2pyYdJ6a7YawCJ/uv/fb6mA8z9Z9su KqCTTQBWtCR3FidXb1TtOUGdwfN6PT5/7ZV4ln6U5vCFgznRPf0AVB5JR+93yTDphjTh YpJEzmd0726ZSL4drXigsf3J+LRrLOeuQE4cK5lrk1BOCQ/QPfhAftvunUr6LaNuYshp zGswmQ9HD28m4JVmDecYMRoHHWHGFsqg42M1WD8WeZb+2nKdZ89eFaCAfzYyx0zXd07G an97CHe3j3YfjnC4MjOzj0LqzKLYJv4WdY4hcJS5bBXNGx1X1Xa9tzqY2rBMRGBk/eT+ 61+A== X-Gm-Message-State: AOJu0YzXPMajjiL+EtQd/nz1LYvqgRitepnNqfWUMbBLfNQyQz7SDNtp dZKg/VwBHtVHAdbSqosTllSh3Hudkar1K3shNaOsZnDhhuftEsxk4pP2w1AnS0SAzqDq8Xv/h9F vsTY= X-Gm-Gg: ASbGncvlvEBa87H01iRFSScN4FbP/mIphbyS0CNh/4CNPmOiabS3ju7xXhKWk4W2/wS 4lXzY2e1XMyPmwisqoeE8n9F5awD1X3G8kpcxge41IUa+heMdluRyGT17dKkbp2wlDrqxuSeyLs K+hRw2f71Vz1cg2VrRXlwreZENcRJGphv1NYis17sw08zIiJ7862NK9hEZQW8J+rlwSof291N+j lQTn8kTp1Uaimcc17EV24cyZ3a5Zmzb7GncAzC9FkTxmsHRRiaq9ngH7N4fBQsG1nPr+UUag7Sc JpHTNi0wfsrGWuQGSfKCYF+8kqR5R8/Q7w0kgiNT01T+2d1wSrjixz4= X-Received: by 2002:a5d:648a:0:b0:385:fb8d:865b with SMTP id ffacd0b85a97d-38bf57be4a2mr37231545f8f.48.1737824535020; Sat, 25 Jan 2025 09:02: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 ffacd0b85a97d-38c2a188689sm5983635f8f.48.2025.01.25.09.02.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:02: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 v3 10/24] target/loongarch: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 18:01:11 +0100 Message-ID: <20250125170125.32855-11-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-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/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 17:01:12 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: 859828 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1339892wrq; Sat, 25 Jan 2025 09:06:49 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVSgK294fkMQPV3KOhdJXhI6MA2cb1bO7ZY+ylHZ7MxF9/kuzqFpJcMhKVDMDSrhuEBkBguqA==@linaro.org X-Google-Smtp-Source: AGHT+IHB4xVYHWnfK/AfGH2n9/ucfD1hXAXnt+U4DqBrdCnnIVjC3g+46aAoeVae0scj8wKCxQXH X-Received: by 2002:a05:6102:1085:b0:4af:f1c6:af04 with SMTP id ada2fe7eead31-4b709cd1cc4mr6623733137.8.1737824809193; Sat, 25 Jan 2025 09:06:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824809; cv=none; d=google.com; s=arc-20240605; b=RmqbhfHlMlubbBfhh69sBDCd7pMlp6RGVppLKDMuH9PXnbyqdbmlmuBe3k0USyY1tk xmECnEIXeAnCqQ/zaZWnY+UkWHinpatRpd+momR+edGN3T2gNtbn/oRJKnU7Cccpd1Fb 8/N+g6Bz47EwSf+iciM5p5w/fJhN1T0PmrwncXLAVV2RN46D0QAQ78PZQJe3aGUK4kw/ 66dWFDgBD2843veZKMDoAHrtjZZA/6bvHbqjFXY7vzrkObhI03Utn/n97ZwLr8Jbfoks ebw7Cw+EZ2u8bSuI5J3uYYAGfefGR2scUQDmZ4eqMpNCdwHKtF7DJXwGJpgmQEinFtao rJLA== 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=ilm59ctndPlVP4bxAMTQs+UdYPrb1cOXnCyG8ZX/DpD8NViceOPx4WyU6oJYrd+eZF 3BLTbHaN8AFWLU27EC7cO4l8ScDVbJmDYQEhIVgASzaF5o16hrRgeY89ptHaqSZa+zUS U3a9ZK1NBBNKa8PrJO08ZzRS+Uw/sCdBMVbU05OPrufTb1HFJQ+t6RL6NaDpr12HJfj+ q6VyVfsGR2yckgNRM/ZGcbhvqwQn05lSvP8N9D6FO/aDq54ll3deu7OWEjzILj47Ints lGsTrl0lHHYa3AxNmseoId4SnBpwsrGYPpyD+pYaoyqxVJEVmOZXiu1m8UnvxJWO/XzE +MTA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D89+wa1y; 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-4b7099aab21si2136210137.375.2025.01.25.09.06.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:06:49 -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=D89+wa1y; 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 1tbjYG-0007l4-Sh; Sat, 25 Jan 2025 12:02:32 -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 1tbjY7-0007Tc-VN for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:25 -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 1tbjY6-0000VM-E3 for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:23 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-385f06d0c8eso1719390f8f.0 for ; Sat, 25 Jan 2025 09:02:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824539; x=1738429339; 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=D89+wa1yb8lhJLBtHip/MtXMZJXqXqqZbtfXl4+7Lt05+U7bwzKObVf73yXSosj3LN 3UafjpJxwfc48AwSl2X0aGX6EfmDjUhf0r+EtsHixR45vAEOLyeeZb0j7rrK7Rm4xrVY rajjUPsCyiaepy2k9IXdQdR3703OGSTXSt34BtYgygmRptp54FlfAk0POEzMFviKkgOD kUT1gQAKE5J9lGSRGK5JqUp1FHl90LQgGqJBJAozM+z4i7JmsOy3kEfIaq4JQhasSEOl pfJAzq/d3OVhxye6KI55e+5AG9hMY8PXvJ745sThZdRFPr95xZVAWS4waw4qvYe8CDYs aPYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824539; x=1738429339; 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=TYXNgR9VG9b22UD6Ro1b3bfrCAo7Mg68xmXR54HuC1NjM3PGAvlssWu4RxfzmdiWmf cHD/jFwfJWdsZ87wllg24TiKVA2KQkN3kk+PGuS2qeN54P5FENtbw5mL3FF0X8sO3o7B 3DH710PakWxGM7rCPzCyKAK2DLxIxvrQZ0xasYXLkOmnZSCQ392+mYlknorIkNNY0ih9 Gd1SsFQj5l4D66EB6rhx+6UqOuDViEnaNS4mai51Iqz7VnXjvnXFMbwxPZlrGVoxDlsS bUATWzCaqW4SJ6xLxgNla4lRJKIpqxIBCAHPJKGMf1VjdKZ5DE/e7qaB4Wn2hvuuT+tU gM3Q== X-Gm-Message-State: AOJu0Yw16CpOR8M4nVr2MvdiGOjGT7jS8PCYlW6rxY5qMShtI0lTAg2E UDDBT/23vL2TiSZ+dzIs9OttRAM+rWuXAuyNP+sZ0oMYaCWJA9ePKBfg3So0dRgNdbIBJ/m3hz8 HTNU= X-Gm-Gg: ASbGncteSQDVXXcpgYx93sNxJkgtfF6itRcDoPo49zOgFJ5wrn0P4GX0B3tTfmZW++H kwppeUeWF5OwTFx2r+fwqNUYVW9QP/UexTf+ix94xYBuqD6MHGnDgmuDpn/78Fb5rsikq/VNHmz Ax6ibJgI6Tbx42yECW4Z7NucbjtkdGKmY7nbNdv2OlLYWQ5LmgI7okT4EV0+qC7pvRUubmr9qF9 a85sdGJ1aVjL7oX7NxVqDPu47+ut+/lmWsiPLlhXNNVlxVYFEzUoUpFpxMqYTQKMbk9TXyJiUHx m4+Vtz0Ro7uqhEnYC6pMc6WIzRoZU5sAtBH3Nxi04WfAusPPFXfxmV8= X-Received: by 2002:a05:6000:1864:b0:386:3328:6106 with SMTP id ffacd0b85a97d-38bf59e199cmr37773444f8f.35.1737824539518; Sat, 25 Jan 2025 09:02:19 -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-38c2a17650esm6046557f8f.12.2025.01.25.09.02.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:02: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 v3 11/24] target/m68k: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 18:01:12 +0100 Message-ID: <20250125170125.32855-12-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-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 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 17:01:13 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: 859813 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1337966wrq; Sat, 25 Jan 2025 09:03:18 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV/EUk5CKwbKo9MSmatHEif+0suR01k9Lm44zalzW6nqwZEyKYpcSxLSpbRuCDVxD5A2oMqPQ==@linaro.org X-Google-Smtp-Source: AGHT+IHCURdpqVtkoQGuWAczAH5rWx4EGEfZV8MEsgcQwtBmqz0j8PMMsr5uU72lcI2mzRNXpb/P X-Received: by 2002:a05:620a:2416:b0:7bc:db5d:aeb6 with SMTP id af79cd13be357-7be6324920emr4979787485a.42.1737824598266; Sat, 25 Jan 2025 09:03:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824598; cv=none; d=google.com; s=arc-20240605; b=Ab5uSYWPxGZt+3FQwEg0e2hWhAXkoD/QNPsaopa0AkVzQ/0xfNqPQ1Pe87lTEHT3Wh wBs5Lf/GDo4jJyh5PGGnKDfjPv9gkNJVkHXWyIBdFM475qgp/wWbPeG8tsuMvlSUexes E45QReVaYBBYcjKysXUFF5eM176m9X640Alf8KJ4EnHFrMSSgCkX4yM9JV2EN3KOER6O /LW8LcG21A/T4OeZHZZIfAj7HLIeQxWOzpWQjyFVFbfv0l5jOyAIUbeBaFNFj/XTKul6 DNMb0xECtrNecjRcCN6ZCdvx7tNwZrDS+JGZk+gv9+NE+LyiGFIg66H6L0h1RPmu1i9H C8OA== 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=W8oUASHsICkcouDTobOIiIE8/1RZFJ8KiOVYh/7mAC0S5gBroFciYFtVdbKHCf7NnI jZPNvZlNWgzRLrSQUUGDRschHbjGU20oYT1BW5Ez1l2aiLXgs4b6RrRfl6hwlrA4FEN5 q45HaYo7Bsr2Pke4FQHFEDhtE2gVTVrhzdWA2//Gb7YkvxNfLgVAKLO4iwEdzR9GLGuy Vn7KaAO1DkWcgmmRYtvlJCOreaPQtEfhO5Z4tLVvST1/0tSOTr+d7OE50ZmXldTSBuiy wRixdBMTP3h4JmKVy8itVKnCrsrf41Cqs6WyA9EQ0AZz7IAIFG9TRt8/LymeFuX4kPI9 /lQw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yaxoYgbc; 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-7be9af11c7asi507707285a.552.2025.01.25.09.03.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:03:18 -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=yaxoYgbc; 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 1tbjYH-0007mA-TJ; Sat, 25 Jan 2025 12:02:33 -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 1tbjYB-0007bT-MI for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:28 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbjY9-0000Vz-TD for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:27 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-385e27c75f4so2749609f8f.2 for ; Sat, 25 Jan 2025 09:02:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824544; x=1738429344; 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=yaxoYgbcLrG0AbeBuB/uydvM3QT0JXCyXgZG/CaQaE9tyXTEkYLNTiKtHR24ejkkGC tPmkxSctOdWSnGi99v5Sl90iL0J+8gwtxvJR0SNjNqJT8dezqpGnGNaUs2G363kYwTWK HGASgW/UZVsz+DnXEFIhcZBZIwB+ncJrZ9kqgrpFmbnUHi/dJ5VulSwZRuBVdTi9Z85U gAoTz99L/vU0UfBwKuSijAiyEiNLFOJVn+97ydIqi/je7qdDtxxoRS84k8blzkoNTlpr 3DQ1/ogzCt/0ekAzgbO9BLT6hLn8CGxVXtWD07Ansrn3hNcWQu6XLYBHChBpufA+H9OV qSrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824544; x=1738429344; 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=mBGTh6Et8D+uZ3I0oiJPGPk7L8mYaOTuuO0X6wzWufKadGGqGI5Mw0TT9j/m992B/X 4SjQNUhkEOxHlvkywpNjkecxo4sJE7p7UUPDREer3J7ODFlARHwhTAuIfgLEmdodp/Ea Y4VMIqELR3DIIMmMayMXBN+CF302ISXPeJImNjtGo9Syn2i1VYLNKd3WDjUF2I2yDkSp bVyfGdvLbC+/T/me2BlImdpONISbumGKO2XmDysUAXNEW1gFkdFEWZ1SO96UIso9C4Oy bVqxdX+DYtwKrRXr0EcTxFL2EjgOJGUaYxT3nANz1MFeDfJUo0giNx9EVm1GZG5XPnMm ag4w== X-Gm-Message-State: AOJu0YzzE1DgRhtVg+lSfi4ctt36px8z6jSDTZh60XbHRxfj1tkgr2u/ pflyQ8ULTvqLCVsGBqagQoenAid4n5SCiBaML294wEgWv9Th/fI+HzeIqkw74yKrltTv6fbpoED tjrI= X-Gm-Gg: ASbGncsnre4qh9eqjzJb5/derAQSB/pH5ErwNHdC59NY556q/ZqGBfs+CN1L8lCNGew Uf1+ZhtEYqDAdEAveD5Yy6cCymvSvJ5fSFxsbHZ3Z+GUrRwW67l4mxOQzdUWSfPHSiWuqbaFxBo e1WAy20Ygkn0g1KCYMo4n3ZJ8WhhaEI+ym8Kn6Yv9yTVBYliMlGU7b6AuNnl8fxUnr3JpU2ISG5 cBygjhWj78TRMoDEr6lyM9qId8B1uNXW0rlFGd0UlMRp0zPOA30rYqYs3BCvh2O9H1Sx53cai76 RGMNWsbKaIg40HbHrg3mi6Y28AdRGkWT9wXnx7xa7sVJd5YExecBMbY= X-Received: by 2002:a5d:5f8c:0:b0:38a:873f:e31f with SMTP id ffacd0b85a97d-38bf5677ca4mr29730759f8f.1.1737824544092; Sat, 25 Jan 2025 09:02:24 -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-38c2a1baf3esm6103844f8f.75.2025.01.25.09.02.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:02:23 -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 v3 12/24] target/microblaze: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 18:01:13 +0100 Message-ID: <20250125170125.32855-13-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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 17:01:14 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: 859815 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1338043wrq; Sat, 25 Jan 2025 09:03:28 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXD735tOrFbnrn4YWRqn+f91Q9NAnsN/22UIsziwOcGMZXnf9tct4YzHX+jeU5a0g1ngqHihw==@linaro.org X-Google-Smtp-Source: AGHT+IFzlkaXaby3M8VHkDK4zHIOVxMd4hhbkRqOomYaabqsLkzP/AhpgD3fQGGO4wsSErm/xyBG X-Received: by 2002:a05:620a:2988:b0:7b6:eb2b:b49e with SMTP id af79cd13be357-7be632103abmr5706626885a.6.1737824608387; Sat, 25 Jan 2025 09:03:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824608; cv=none; d=google.com; s=arc-20240605; b=H5EKsrvblR1w3QmP0lckQxTI4++0u3SJjyQVhWY5Vv82ry7ViRhDxqWz3FKfLdpq88 tC57h/ONUn+xNJNxRDotLyafG5m5rkcP1xFjVO0bKhJf6vZaeQK34Z0nt8uRh0sNjUX8 +wXQ+SXOhqZlM6U0o1kO11HxvrbV0ut4IZZRhBMqUdx2NxqUemc/9todOC2VibxTnZsG pPwtT3WvHEDmmua7k8PLg+N08/YLEuwSHVPgBfdmuzaaBkXf+3kgxi8gVofCVlVOZ9cb WJz0nyB635a0cevYLUnDCfUvYa53R8HIIvPO9unVnE6EK0JX2U0SI5zhxPdafK6DJhrk 1qbg== 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=IOWdNXrfD0/FEvjh3tlXMVTy1o2qyO7PEGLwqcjgSPRE2K3AM82iiyHjg+txKtllCi ltuTVyP4lhinzZa0EV5X3eRzMTeW5gLzuApPZeln8NpFNPbh/PGnZSaZlRwr9Y8akQEC hw+Q57HelbsJ5ZCnfCXqx+Zgph7w5FXgGvHJSwWAgnT5n6NNnZB0ce6JpuQH5PDqCoLs soVsXHhNpEYICdvb1SHD5T/C0tLHGvONjqIOp7pSrblIhSGNx2qoo2ko2Pj1zxLxK3SM CFnU0lwNrw4f8wzK802sbhVoc23EquxvWiF/NROaMelzJir1+zwvCUCV89pzsJSfyZ7F ozNA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VCQwHzaf; 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-7be9aeedf4bsi587641185a.424.2025.01.25.09.03.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:03:28 -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=VCQwHzaf; 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 1tbjYL-0007pm-EX; Sat, 25 Jan 2025 12:02:37 -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 1tbjYH-0007mD-Fr for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:33 -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 1tbjYF-0000Wj-V5 for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:33 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-43618283d48so21879285e9.1 for ; Sat, 25 Jan 2025 09:02:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824550; x=1738429350; 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=VCQwHzafaYDHpNHTUSNhEO/n12VvMKZC/l+XP9b0XJ6H+Y2CK56yctjgx9MqUph5Kx oHU48Xq9AVgS1oa3s0YM/tnKLgBrRaTAy0Uyq+63zwSH+prS+OFIaBqwEPgUcEHlXfyC 8jPdKK8fcYhNv2oNQG4G5rOiezGHt/bHbbtnVK0utDG3rFXmXqUTEZcf66H7bEHvJbif mbLgeY2dIJUeIIx4U2L6DcEBc/Xq8CBBvYK0lMabAS7CYKAlGEtcIVym+yWHLroaYyKz SQhF4LrQxyZjNOa8NcHhtaT37MT+nazWRh7rTHNPZJ+wWA+bcDZHebD5zV5/eNAuSUJY mraA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824550; x=1738429350; 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=Y8ghy+YfYJumrs53tBJF5BpDKO3237guXJp5Oa+SF1aryq3f3z4xD5dK/YEt7sLqPe iRT0Ujo2TExi0UmFy0ggsuGA6nh7vqtJjjAPH9/LNWdS3u12uSi4OFzcAkSESGztM+rm K86SBUWmkEBHvIMXmNlccXrnWHxxH8rmtGi9EFWWfSqMrsvt3z98lzwsjzjv8dp7rDvX 5pviwdIxYr94cMSAAHWVS3N9cKClCslCuawHhhYu919ihmirgtCr6lZ9o4y4sXJknxlN 3ZRfWRWxHtvZTXTrLaOXnLr3uhcMIJz2oLkcQCsnZPa9LXJRlTCEc/9ZPlEP6h2odvk4 eC9w== X-Gm-Message-State: AOJu0YyJWeOVKURv85edpuwYctOfPQzFnShN8pbtjhUBgk/YONXx9Ml1 AFWQ7O8AwRkvlxheKwsHR+UPtpdBfmRPeviXEwOikwmA2WklGHyoUPhdEgetlJSUqUcB41EJ+Mx W6dQ= X-Gm-Gg: ASbGncuhgFB5VI+eysqnX+D3fylegSDVT13XYTwVm8AEEyZGJ3bj6AgNgoN1OgtVuzR LlQZxAZVLsh7Q/igZLORZiz3dgA4MtdLUVPCVp4RegJ3t6PZh6sB0zxTetWgagzNoWkbIf0WzhY l8MAyWjG17S80WRmlS86nNtBIh9MDwb+BwY7OM9cAZxeTfPm1ibIzogLgHRi7xzUETzJ/bjgsdo 6cVkCzg03Bnm7FjYb1TSx8a2KcA0hbaT8PN/Qo0+77xyNWGFzwjKjycIkkuwNUBMJPaPzOkk/CU 4O28IOuiuP6/7IW0ph4IKgMjd5+oKL9Y4jNXrln5Jn8Bj3ceayaF1gg= X-Received: by 2002:a05:600c:3593:b0:431:55c1:f440 with SMTP id 5b1f17b1804b1-4389144eea8mr387806845e9.30.1737824550049; Sat, 25 Jan 2025 09:02: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 5b1f17b1804b1-438bd502007sm66246515e9.14.2025.01.25.09.02.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:02:28 -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 v3 13/24] target/mips: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 18:01:14 +0100 Message-ID: <20250125170125.32855-14-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-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 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 17:01:15 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: 859812 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1337950wrq; Sat, 25 Jan 2025 09:03:16 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU/Nb62aW0LLO0kmzmsSD7D9a717meOo1BQJ1GaUD8CfP1vANQ0MZNL6EmYe8hd/ka1chHKPA==@linaro.org X-Google-Smtp-Source: AGHT+IEHNXaG+zwt1FzBdMi99tT278d6rBHqT4D55pjUnL7N4cL/db9lqFiDEjONf/ldX/XWmKyu X-Received: by 2002:a05:6214:3b81:b0:6d8:8667:c6ca with SMTP id 6a1803df08f44-6e1b220c59cmr586541726d6.32.1737824596143; Sat, 25 Jan 2025 09:03:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824596; cv=none; d=google.com; s=arc-20240605; b=AGPj7PowNiiYDsSmuQ3hYRmkiDNn2WRiGF5QjG3Ep3QuGAYYGPsdC8VCEOkk05f42V JXpC8/Ws/9uHJQMg/yvIU3ZUQfV9rNoUvFJfXiTbDHk6jnU4n5woBbQNwpKIV4y+yGRV Ag/VM99vuBLeMf7ST99RglAzjWlP9vQX7ExOCt9rPbhBtVAkDyhCphx37BwWKDCOCJVm FFmeu7OmTZak0FvBrSMXR6doMnuKaynxfioYngza73Ie/HPfjdGLB92wpujNuO+EqO1n zLOqmLI6mk6YhVb23Hu2C0Tly0IUX8ZULN3QF+nMQgHz/nCKE2nlu7g7ewLXKaFHwQbt MIvw== 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=c0QWJgrpDKSn/2qA8lccqbtpBG6ATZOM4ZMWLgs2e3X1QPBwIPitO7bbqjhDXXjdcJ tRaDTlRZoiipnQomWIfwGowKMwD0NVYm6Bgxsoy4tYz0tlbvtrUW65D+g3OFmxdpz6Ps 3GpuqFozAik+D7YOcLtXE4aRdnuCyXav7weT1cFlIAE56/4Tp/omjYKiTcXX+Lq4xf8s IEaWUg1vF/gZJpU+LZcgArkpNS3g1VGKM+0tJ40U2zq5ajCbJalZpgZ52NFoIniQL6/F x+wTTqnQABxCytdr+lzBvgt68JjQ6lsF4HbR8LXsEGnco4p/lGnA4FxvzgfieAXjYNu1 RhTA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pF6NQVrE; 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-6e20525e325si51876496d6.18.2025.01.25.09.03.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:03:16 -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=pF6NQVrE; 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 1tbjYT-0008RR-9X; Sat, 25 Jan 2025 12:02:45 -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 1tbjYN-00089I-5M for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:39 -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 1tbjYL-0000Xc-Ee for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:38 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4361b0ec57aso32544395e9.0 for ; Sat, 25 Jan 2025 09:02:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824555; x=1738429355; 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=pF6NQVrEjmJWMYhLYO/5CTEhhS9dbHjw7hdsZ/jK5GIrSLgYrm41cKcJ5oy6fDIq/g 7txYtRYYVplilf8Z8JIAgWvPcW8SZPwKzWiaHnXCRkudxyh9XVyUcK55rAJCBjDDnM+n Xq8ghcnqDZAFrazWT2VAG2otGBVqA3HZaivsMKCrCV11LbCpovN0XMmejUkP8gNiSOsu NklL/EkobxLHdrxmF4bOPMWbQy0AZyl7BoyWHm7N4rEE4ng2w0qMMpSpY9IQItec9zOy YSRPn29TIuvvoaSogYaRhpEAJ+xYYhuvQ+sLEVxyFbAstg4gM3GMBm0dx4VRygC6VPHv n7zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824555; x=1738429355; 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=Dhq771lJs/lOncsqzgJSKz6eacEJ/OUsY6WdrL8kIcLhMMq4l0xkmTGp/2rkD+XUqC QMh4efo9zHZsJJWZU6Auek3blM7r5BqyYKISiOY8J3fqsz1tkgWlsknJ9vflv+3miTlt ckA1z94FVrK+MxsmC+GVH1HyMbYEiMqjyfcAW5Wbn3+HRKjJH6O324xRWvv59J3hA7Md pCgP+bW5APmWScE6uuf8GMW105iXDyxDXu3m6rR5Fx98I9bJ7wyRa1kJxBmMhSTV10VN k8hk87YFDjTWrxUA/PU68Xfrc50NCVUM4p3mXgFodMYcT916qszWuKcPlT7r/fsyz3+J shoQ== X-Gm-Message-State: AOJu0YzyEgnUKNC0H6R1TLGVVt6HTb/5vw5gtwMw3NcKDjZtU/NIgTIe GWaD4QSm8vxnq02G0gE8/MYISFWVxlEnmYA1sWMfw14c1SK4ZsWdoMZcFsP8wSLHPrVdBHwPcp+ i04k= X-Gm-Gg: ASbGncte9nMsHqBSscGq47nUbiqvrdnqsxPUtsCohG9V9axZyYcGlLkbvioW+dGR/pX zR0hyrCR3khuGBubK5eXD2YCKJZ8tzjlrLjvCZnKHRRt1fBsUQTc1ln2IMKVxvm1diBL6W3EZ3Q ODybMb4WunCXbVTZXfU+J9PUZsKULnYqOfrh4UPPByxO6c0wdlhJPL1x5GmRFCuSzaitA2iZRFi IbkyJT8sptNKmI9+363allI3uqa1n9jlk+JqkfSQ5QL8k+iz9URlxc7kDhCvf/9Usl83/nH+XrG WuUrVqSrBNp15w5z8pldTTmiYYpESZiJDd+4IWCGw3wrdIDie4a1vs0= X-Received: by 2002:a05:600c:468e:b0:436:5165:f1ec with SMTP id 5b1f17b1804b1-4389143145bmr337588915e9.30.1737824555606; Sat, 25 Jan 2025 09:02: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 5b1f17b1804b1-438bd47f120sm68574425e9.2.2025.01.25.09.02.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:02: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 v3 14/24] target/openrisc: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 18:01:15 +0100 Message-ID: <20250125170125.32855-15-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-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 17:01:16 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: 859822 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1339056wrq; Sat, 25 Jan 2025 09:05:16 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXOe3xiAW58NotBAUlrnh8tsbm9MOe/Ybek49zZg1DDFzrqygfv6vFcqHIhoU/Yr/QJLnAaqg==@linaro.org X-Google-Smtp-Source: AGHT+IHiBaF/ll0h0JRNqoNh7kaUHvoK2A/cN6Yi0rPxQ/yqX/d3DhBfWoFlVq0lYGinkL3sxQOm X-Received: by 2002:a05:620a:2a0c:b0:7b6:d4df:28a7 with SMTP id af79cd13be357-7be6324d3f2mr4904205585a.38.1737824716449; Sat, 25 Jan 2025 09:05:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824716; cv=none; d=google.com; s=arc-20240605; b=lPQcR+0fWwK6qv5Vp28SzGLqqKqAGtUX0SQKFfACeEbu3Pw+5iuiUMEb5qhRsJcOHF eoOx3LNWnGI3zd1Sy5POFjTU5eBXp1PQ4MRvhZF0uUjoc3zfeTfEZngg7Q4JcYoLNptZ sgFHQ6ZFELsbWqwhS6+K4p6NzpPU8xjjJbmgnDHCcji971GOlJ/BG+BSbTR9otHPVkmd 00OHFuyFzo13h8FDXW3HVDMB1zTriEu3uQe6+l1294eHV0/SLHicRsQoT4JRpRO8PAab +BqR3080ked+k9X7OpHP6dB7QtnNSch+yboTwouu1zGI3j6C/fz6YoxVW/7KMn7GMJAn kmLQ== 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=lvLbLJwpNSsF2WABsn5d8u00HXUwY/OdF1cgXXiLJjpgHmF6sdW+lwLeH1DegLBubJ niIaNCHn5tBVK6MGZFDCLBGZMd52CSkybOv15o4AHcvSklptkNyZuOj1yQYk4gmpRsPl Au0uxRerBuPqzsqDuVzcZ+mFIRiE82jvnUOGUZStEA58X5iQH1Sr9RPIli63x80DSBqP K+ZwRB4dGgDtOwFcPtDGpVjLXv8Y2NY27hQwkvzFVJzMEQ40gt+ue10np/QgpYwaZrJb /sl5b+cWK5l/3i8BpPJoYyxDZoGF6CkjxIewcjQAn7Kirs8CvxqJkcCGSERTqPvjJrdf nKcQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="v96M/93E"; 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-7be9af2b832si603540885a.649.2025.01.25.09.05.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:05:16 -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="v96M/93E"; 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 1tbjYZ-0000SU-JF; Sat, 25 Jan 2025 12:02: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 1tbjYS-0008Rk-Sj for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:45 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbjYQ-0000Y6-P3 for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:44 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-43675b1155bso34956635e9.2 for ; Sat, 25 Jan 2025 09:02:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824560; x=1738429360; 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=v96M/93Eomx9cfgh21DsjnTTuiTReirZMmfzeFEIBjuyApic/MLSBoQd9QLsXFRmP0 4Tm7mOfRCbS08zKNv9ew8NxyhW0TW0UuNxXmhzISyGJHXC6eHpNREYwd2u614Nf8bRZ4 TB9g1RMZNJAND3WPb6eE1xxd/xdzgoxkJpNBdOWlb1ag5sP/LlsKwpxHobHZ8c+t4X2m cgIj6RCyVMxWSuWgERSRopblLb4AQ3Ok5KzhGn0EhvgJ+tAVd9L/np7qTDPRvhqjxF7r gRdP95m8FOMgcwtyJGA/PJNNJEfzPk1qBLEV57qRPcNY98677rsW12krEtJOJpejAiuT Ns+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824560; x=1738429360; 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=uxb3B3qwW1QVL4kjQGexG86jZo4DBshmpqdF/cW0IgOUNYGEpXyzckJWehtEJ7AABJ 3N13r7s2r2eyfqCJVcp/BdQcOU3y9a6gSt+iVCxJwOx9vexYzGL8hOOSSe8u92sdCrie iAR13p/zEBxuiCqYC1nmrUcnbE3N93X0dkqHrY04gdT456aXin81u3FYVBvRU6F9FAhF jqHJxtMdDzpAWiXQ6wSUZ/j6Gs8jmAY8orzqLGX8SMOlTzulAKP3tk/wf2B4gEpG+9w/ oxa8OyudKPMobfXt6ttYOz/ps8FnOBB0lzbZfAMRpduTvORwljk315s8+aU6Z8V1CFrh AoBQ== X-Gm-Message-State: AOJu0Yz8a1rL7goeaJRrvbE6MGjoB1E4oaykt3VXT87BJ1hdZ1kIDmIF +nyXEnPtFV+D88HswQB9BuEbV/71IJwtsDrbhApq4f05zY0SCow99dOgwuP0zrD4J0WlcfJKght kk78= X-Gm-Gg: ASbGnct1GvBcAUOqn4H7jQwHLPugj7AIiEg1hGmpVrn0gqYIP08ET+UrdHKUSR51p5I EWdq27Dj2mIBsDBrDHBbLo9vO+SgHYp7VVNLcIDICTFukLJ3UvxMnHwAyAqbjQWhNaS3cGt8Ui/ vQ/w5yEtTNAL8+szLo8uNBjLDS5DX5lPPC4IeScyo0ujbr3J/pPacESXJ/exxHfrQBN7kddJ44P UVV00fxAwEHLRufBILPnlm4BF5KJFoePnbEE8XmrfWSioz0Cs0X9JFMjp5PJeddjUANbRbxO8IW +NxBPJdOaGBbEr+rMrJl91BMORVgc1fG08aDSz1XPM/mgaRMx4Jdz0s= X-Received: by 2002:a5d:6d86:0:b0:38b:d7d2:12f6 with SMTP id ffacd0b85a97d-38bf5655264mr31626626f8f.2.1737824560275; Sat, 25 Jan 2025 09:02:40 -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-38c2a1764c8sm5907359f8f.3.2025.01.25.09.02.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:02: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 v3 15/24] target/ppc: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 18:01:16 +0100 Message-ID: <20250125170125.32855-16-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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 17:01:17 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: 859831 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1340296wrq; Sat, 25 Jan 2025 09:07:31 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXqhUYFZdwsJ7UuTXGLRSfHqygiN0G5zk00bS5UdzkOX/Y1wsOKHltlmaBDjnDYbXapDYO3LA==@linaro.org X-Google-Smtp-Source: AGHT+IGKQu2hyr07q1FpTKP1UAD/4yymQ0oFl60RoomT3pMm1zQw3p5feOX7X4Mtu6L1qhfVpgR7 X-Received: by 2002:a05:6102:38c9:b0:4b2:cc94:187e with SMTP id ada2fe7eead31-4b690c854eamr30772438137.18.1737824851668; Sat, 25 Jan 2025 09:07:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824851; cv=none; d=google.com; s=arc-20240605; b=ZC99YAmN0PT5m1AwY23LZ66EJmvPP4urxRb2HJcoLZtUic/BHfEGIqqoKNY6Li1LwS c1QwOQAkS9AT8ru5i2aAWYIF6rRAgTa7ZZPm0GwHAWWV82+/aAbi98ipkoHHB11HmRrM LV3nkACFvSsMuFYZSyEWRMf0xJIz2izsuFUyfMMBNfUJTmZ2CmJpOnYdtSTu476BPZq7 8FiZg58p7Z+RFk34rMNRyeczFu8QXgs0laFwVteVHa3mxG+aN1l5jr50R3bDHywmCA4c W0JeOIheGipO7HzPfjxHpeUxiurXZPMbP90rr3wFIfGeOCeCLq/Xzsac9cYiZN3otUUs 2HGA== 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=fk7aBJ1YVaQFXQakgbaQLPgV7qWoH8E8JyHmrBP7c++BfT1urVBATV5HLSvud9tjb+ r/0EoRFz685jPWlE+wzzmjekAl724i2G/KBiHyp7gaJySHlKV18bclqCZ3AAnpN0Wa8F 8wOc/ZJDeZLd/6uWPKUO0Jrygznrb8pIo3rsnyde9eEnwTqNy90qvz54ZpBbGUHOmRMg UAmkYMdn0UPvqzs2O+hi/oBcroSx9pfJ1rtVqH3rlcOTZNLKGvCZ5MY5UZ+G3KesdNTV 4gMXifWFFzrBc0t+x0ZwI18l+RoZAWCs9SdvT6p/tNFPH8HBg8cnnwXYkHzMdfg6TvDP MYtg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vjNJXPia; 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-4b7099fce4asi1522997137.546.2025.01.25.09.07.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:07:31 -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=vjNJXPia; 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 1tbjZD-0001G6-Hb; Sat, 25 Jan 2025 12:03:32 -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 1tbjYW-0000IZ-IR for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:48 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbjYU-0000Yp-Rg for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:48 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-38be3bfb045so2823108f8f.0 for ; Sat, 25 Jan 2025 09:02:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824565; x=1738429365; 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=vjNJXPia0PUsFanBpDmNz+UZKsSYPHKz9tMycJahgLJwn50yPOeuR/RPegF4zWzsyu 1TRVwtKTonjZbYrCJvh+N3bxOhEb74g/bVdbFjmGcreHeaf7PKijJ8riqiBE9bHP6+sp updK4CX+X3PZVeY7PMSi2MWa004N/bbgbuRvOSBUAC1L7NBxpNoU/3jsQLIEDd/YiObO i9mio596nmoLYCKI4Rtk4IOXYYvizDd/OpWKGHdSOXpMJtxHXGi7ceiJTbfHhLimsurg SYIUNi1EN608wMSd6g75PxSC/nM223b+46c23GOe0frghu3xo7ZhRFYTzjxs879+pPXq 8P+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824565; x=1738429365; 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=saIoNxEHBbShTPF+msgQ3wNgQyJdds2bATNazscdL8xhj6yzEnojh6kLLyIxMn3zVF K11Lw2gWkh+PWfx8jBD9bNeeWCBjyyIihbspZ5CuZdwinUFUXY0HUUrRekpU01c6dh37 13hkslcx/J2RGovmTVjAMuTigRks3iysH17DM0PqomO+oorHSM11Yz8UxBhBc3xFxT1m j8F8F5KqULTtni5l8XzIgApFkgvL7IxwZ1GBtQtscQOxrgeM4f/JR3MlhBRucDPBcI8J SXXyCWhBZ+HAzCv7tFHHjMk2wPoLDg62cnzNZudwYjlPEOQXhTHNP8lIUZwMz/dx982J 3isw== X-Gm-Message-State: AOJu0YyDDGwOr9PNH4wejNpfOp7ke0HjqPH62ESjqzvga4iiQhBImFh4 u2dZHxCxQJlsOq6BdiQHkKxeWb1us69Flm2x7REvHZbjdFiTxyPgrddtgduUYyiaBpWwFiRNJa9 2fMY= X-Gm-Gg: ASbGncvA6WFrexan18XBXVYMkwRlS9IHvXuYwM57TBukCX5uq02NSRhGsuxnsgI65Uj cKASC3wWdgXeozWQqHOwsoD4pL+96ZiiyHqqaSavxiVJWRVZR7T0wN3zW8jqp4h6HWFBnKvyHRj VRj8HARVl2EFy7HLkSKpFnzAUHm7LZmzAQBeWrjIXmFOhEIu/DxYZ7SJ2n/ntUSZejES/JppMrw IRmMBkiHwvfin54L55jr2UhGhStqAE8t+EjKYikbIxTwHcG7/Q50Cu74resGJeZ039H6k8SRtu6 2GJ7vCu1RXe2qXHhRw95HmV204Yo7sJ6jZ9HZPIxO4XJNQ1R8HJ6nV8= X-Received: by 2002:a05:6000:d09:b0:38a:88d0:1c9c with SMTP id ffacd0b85a97d-38c22275430mr9605028f8f.17.1737824564866; Sat, 25 Jan 2025 09:02: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 ffacd0b85a97d-38c2a1c4199sm5861138f8f.89.2025.01.25.09.02.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:02:44 -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 v3 16/24] target/riscv: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 18:01:17 +0100 Message-ID: <20250125170125.32855-17-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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 17:01:18 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: 859816 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1338371wrq; Sat, 25 Jan 2025 09:04:00 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUpRcT3cu4VGLwGHM4YnsyAMpCMvl8mD5vx8CF4slUR1+q0Yq0QlAHrhV6wQ0WNMZ/h5PJcxA==@linaro.org X-Google-Smtp-Source: AGHT+IGOe2yyC87yWyyd0RB846obk6hrw5mVsueUjnPwXDVnB8VaFmy/RG/5SUewxu8jxYcGERVq X-Received: by 2002:a05:622a:1986:b0:466:b2c9:fb00 with SMTP id d75a77b69052e-46e12a1fd6bmr589074051cf.3.1737824640283; Sat, 25 Jan 2025 09:04:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824640; cv=none; d=google.com; s=arc-20240605; b=ET5xmss1xUkswAlrl26WGvgV4H0ThTAr51KcvtooB8bQRLmwoWrMk/GQRxZkwuTu/e nrQTGlsFsl3mX+9oAYdJ5fMNa8TYMqH28X3QRFVMoc278AKfUks+M045AMULqQMo9CmE RcnyitZRZmscD8fQeEWdgtFid2kNinV3/cVBbVALvh1U+epo9xuOQGWNyPOIqvZyLkMt zIxRTrrCwxn64EyCFBb7HoS3S+Bk+0tCVf2fFsY5VRKbhTSERDoS2N+r+Zo0avWN/OIp v+ATpYXwnUv5eKcNctms3cfoAYPSpiXVV83U/sKCkO2bhtrH5ctE6JfQxPKPICVTHYeZ e0ug== 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=XessNlSpxRWTHMAp3zFqAv8FT7uVb4e13dNTyfxFHI19dqwV1mMVI3tcPCO2s65TJ8 yUBgRUyc6wqAIpCF6lToHahr17Rm/q5dwDziTY/t2Dnxd88KPp0vq+t+hhqe9m5T7IDu qhyTRNmWQAJ4ZuQVtsk6eZ2/cUGMhhRZcZAFgDd/7hHx3A2CPdGmpHol4/pnh0WC09fN HNBfjCkuETnwDKHMDrppux0Q8/4qmw89aXIwSIIwRuUj3cRkXYyr/oozfEt3NA69XYYi ZkyPw8Lzp/z8yTqmRYKkjNJ7ja5s7Y7b9432cysLRUbbjDP40uVYjgdWue1QVcwcyGhp jKDg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jeIIqwa6; 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-46e66b6ab2asi52512011cf.274.2025.01.25.09.04.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:04: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=jeIIqwa6; 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 1tbjYz-00014s-9G; Sat, 25 Jan 2025 12:03:18 -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 1tbjYc-0000fB-Bd for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:03:05 -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 1tbjYa-0000ZU-Rr for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:02:54 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4363dc916ceso26620145e9.0 for ; Sat, 25 Jan 2025 09:02:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824571; x=1738429371; 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=jeIIqwa6s7kzfbzx/TlpELFAHWoZwjPZ3BWj8CH6pnzAm2Jqz1cr/BSNF0y95p9Zmj MfnWQulrjyDLlr7oZghRrgUFvkC3qZ5JKL7EoKaGHsxVdO72iWLxvLjpqYP7Kge0FJ3W r332UjQk3VFzECFqJkMi3ofF+lwnQHiEd1Xoat3T9Jle0wSxa99yVnMzNjQmtaNoDHfW HycYz/17EYqQIBatJGYjU88ciV2DK0eIbAVGZhZ9Yba5RPfLwHRVn1XRmqCqEKnA5exf ociRJAldYRknkTC8ZX1XOWdPllT2Turhr5bymawEluMaFSLnihp9s64BJXYlkqMoJ15J QTJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824571; x=1738429371; 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=QmcaQ/M/1EEPtXvTdB8aQyTo880hbvD0MwzmDiFWYgP2LylXGYoRq0tkY76FO3mDnY GZ7VjFMxnRdoNNT1mQwZxTk7HngTWNbr22sSHTlo6f+W1XvBQ1Q/ETLaQDt4q5yA0Yuf I5Mwnb33Nb7UkKLMhBil97D+6IPhMuOqaG9v9xZb3cUJ0LeMnDgX5z3HmwEIbzmEq84E pPvgcMCQDoJIDDreLj8pWnBkqP5hn7aOgYeDu7g3ttqp+7i+yKJP9os48YSQZuL8Vmq3 P9DyTxRPThp7Zc0EFsxlu2IRPAw2PS59DTJ45MTM4FixEI4AphRKPnQeoB4beroZsLHK hetQ== X-Gm-Message-State: AOJu0Yzz+g9ftGkr90CPrjDCS+EMD1k8Ee9uVQdJhEW5V/DWvZHXeCjS qlqgZCZCdnLE9cKQohwhB/+2dkVW57+aUe46VlS5ZuVMFApPf7gD+oPOP1TaiBt0QUQUoy3HmJZ SB4o= X-Gm-Gg: ASbGncvjfJsLt56wSGSVen0YvaGG+5Ygx2OntjQn9zMZziDOyrrPrNS1YYk9o7LXquV GaIpns7oUPdVIry+SrCdO1kG2bSjGr/6TnK2PWac/0GYgFnnmiwQ4kfsf6AYhKv9lec75x7U4WV 9olewLWRvR7VGj9+KpF+p+tnJqoSxeFPE4rE5D9QHlC8TNfcG4e8XsE+A863uE3Tz3YPuOESeGl nYo2cEr26IbZXz+NFQuk/dtNLw7QLX/1cffXzcM6lXDLxZVeUKAkvyEiWSU26Q2dAQUQBTBs4wx +sOiDV8ZdPd0tmQb6jQTGPD9o3olFOpvQ6HgaiT7n/659hjnWaBjH0Q= X-Received: by 2002:a05:600c:3c85:b0:434:f3d8:62db with SMTP id 5b1f17b1804b1-438b8841d2cmr112892245e9.2.1737824570910; Sat, 25 Jan 2025 09:02:50 -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-438bd485007sm67899905e9.12.2025.01.25.09.02.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:02:49 -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 v3 17/24] target/rx: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 18:01:18 +0100 Message-ID: <20250125170125.32855-18-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-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/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 17:01:19 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: 859821 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1338964wrq; Sat, 25 Jan 2025 09:05:07 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUa+BAPNDPqXGqhyhf6CeQbCkI6IfyPmbS2Vehc385Ew63qJZurI1mun2hR7pujWWPQjpbOgw==@linaro.org X-Google-Smtp-Source: AGHT+IF4zHon0pH5FMvq9zRCHS3IQHuj34lmnuHbELW4DG8s9M1BnmuanJagyih91o4rCdbKPI+S X-Received: by 2002:a05:6102:3fa3:b0:4af:e643:e1e5 with SMTP id ada2fe7eead31-4b690bb1b2emr33759588137.2.1737824706914; Sat, 25 Jan 2025 09:05:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824706; cv=none; d=google.com; s=arc-20240605; b=G6WAbwXkhgB3eskA59djlzM6hWN9Opm7la+kZsQ/93pKz/92dB1iobjqudDfqn5w2A EO4liHuP5+DTIZv0AuKmiG9u5OPvotcVsb76fLPJuggYkHKbh8hCCUF5ddJYKDg8M026 FtafXSuSlM4MoLn3rSLktp2tSPodcf/Avj7ylEF/zXf3GkrWP+vjMzfS/GXhewMswiT2 Jj33tXb0FbnwZ36m/dU3PD5M9DLBLiGZlQZxcokzBMlMTORJSPQA2GwRz6nTCvdCp+OV nm3wdf/ct74fjLXxzeZqH4tKpEgaSoK0ar8vAKUR0+gksb0ZIOxNlrE7WDeVdDWTuOpj Nv3g== 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=KR5tW+ZakiG9UX29OtOplvjr7K09zixucwhDcy2eGetUc3tAhmlV3GKvd2leXOwkKX 8NFB/cRZm5PMjafeCOIG4bQzwEXR882qrQBqbDNDoUg8vdMlI+S7FDSVRxHOLVWMS+PU 1f02P2t7PqjfxgYvFdB6gQo4vuUTdmI9N0gxkJIJq58xDCtlcrBxqEuc1ggmYenV+muG s719Z65q01e4dozldK4hPRTOgAY/SqO4MYwA8D9P73LNIeWJzpsE2ZMvlwGGfHc/SbNI Hf0DH7gnU3x//Qe4M6qlSSjdRMXqKtMrgd0cbVzLChFffkU5XNmXBHZ3/MWNetjLEs8r udgA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lRwvMzNA; 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-4b709a25a95si1456861137.625.2025.01.25.09.05.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:05:06 -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=lRwvMzNA; 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 1tbja5-00028W-Ja; Sat, 25 Jan 2025 12:04:28 -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 1tbjYi-0000fg-Ci for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:03:12 -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 1tbjYg-0000aI-Ni for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:03:00 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4363ae65100so33565665e9.0 for ; Sat, 25 Jan 2025 09:02:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824576; x=1738429376; 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=lRwvMzNAa1yYJeVXu7dU3OYi4z2SSUAiWQG4n89ZlywwfGiLYb6XdG1HdC+ZG9Gg+b xp49JrCw86Qb6BlCRa6CzGTQA5NoaybM9nEDKYOJsughNX9FbBwjcB3yT10lMbf7eIIv yOqdUTyVkaLdSl+KORqxHPmJnLm7M6W8s4Mh6spJ1Aqz6F5kqVywm1OMrE+60UO1m9LS QFo9/uyWwbkNMXIv8XUBSORLjtSKgw8lgs5uywUpNr0kPxOdLVJaOgy5tXlqVQ6gFkAQ f3WBCJnJywUpyOkGIrP58HNr1qDYTYTn3xJ6MLs7+H6KqMFAbnZ5DtJsi0kw0eMTX17v nl/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824576; x=1738429376; 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=o00eEQGHCqYj40QIWbNaopANeqGFPotxKOI+Wvd6/hxM1n6gUQ6SEL18qSSpTKuwh5 lj02JefS7GqKsQadShBjc4p5u9Cq3MzrG8w3T97mGa0VPrvhXyqmga1pEuUU5mVuSmKt Ul8a9r3DsG7uvoDNkV7bTuZ6TVXpp5tN4JuHTkZKkhG809tFTvPKCjJE69wWifikk6Ww b9n8tEZvic6SVVuiGwww3xxoA4aPV+QSNVkUEEJ3gFqx/mvA5ACh5x7kuwILtn08H5Ls 4n4cRIcgOW7xmWRKs7wfmHhtGGjjbVl+LdIzGVS3Rj/7//uN4HjRw5C/ECNGMQU68j2l QXjw== X-Gm-Message-State: AOJu0Yw72GSaZAWj/LgXpzRQIO7cBUIFQjO/bKwmtYCzlifm3KlPmFcS hOPf5oqf3dkVY0fcryGT3I8zAH5OTpH9Q9tbXpRjBRlOGDvBCrJawvgRWjFaQXRAnN6kYyGLIOc /mus= X-Gm-Gg: ASbGnct06rVgVsqOVUUO8pDalcBs6VPqyQ4YyLQIwegVNNhmIJK0q80jQ7dAVOny/PC DO0HzDy9+/21zp4f6c/dotU0epmIiKyhdB2EuVhR623xe7JVlFJzyplV8Lb4J53u1BvMXuAo6F0 n0kmOyNJqGzuiw5MkvpsyM8b/r52UNCcq+f+q23JCHFmb80OtQccb3eCeit7WxkRT4E0d11sPeu ssCWL8OlvyaPh/CcNiS5kVGdDrB8hKKBiGwFF1PSl+0fj+/9eeOcU2CGrYIRN9yJc9oxnympeEt ulhLDEZxpytrRPdEbjkpcf8/32YUAZY53hsi/jCpfVv5Oya1u/9w670= X-Received: by 2002:a05:600c:1d20:b0:434:a781:f5d9 with SMTP id 5b1f17b1804b1-438913e1b1fmr389270175e9.11.1737824576219; Sat, 25 Jan 2025 09:02:56 -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-438bd4a283csm67871755e9.0.2025.01.25.09.02.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:02:55 -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 v3 18/24] target/s390x: Restrict I/O handler installers to system emulation Date: Sat, 25 Jan 2025 18:01:19 +0100 Message-ID: <20250125170125.32855-19-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-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/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 17:01:20 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: 859825 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1339322wrq; Sat, 25 Jan 2025 09:05:46 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU1Sr79vsYHdxd/CvX1uQKGB4xnIpFtdFmaDPHmtlkntsA9zwfv9ujQCtMQ+OGuexkbTuxf8w==@linaro.org X-Google-Smtp-Source: AGHT+IHSNc80O3OTFWgH/LNdao3856k0VakKVCNjNhwlAMrzVY732rGdgxQ7gtdpYnMEZ9i3+7aO X-Received: by 2002:a05:6122:1b09:b0:518:a1a6:4642 with SMTP id 71dfb90a1353d-51d5b3739d9mr30927092e0c.9.1737824746002; Sat, 25 Jan 2025 09:05:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824745; cv=none; d=google.com; s=arc-20240605; b=MscNxUMFjW218EDjw47GCMKZ+uwDumLYuqz1HX8Ta+Gn6+qseAPADxpu4TMv737lT2 hTS8xku9N47koLhuUNg0UqrP7mt5eGrkL+xZpxS6Lo97xVx4/awVQ8FHupuhgR3MxqPN xH0PvEFz5rQoYBdGB+Q3y6mDEQuogPOOIQhn1GJxyGSMjDdgiBspBpDF35KSJLli1vZy mw/IJsDd4LeL6fH0bey45jdU1j9BQQx+tAu8V0OuqVeH8h1JUziZN76d/+sgxJt9ciZe OIuFGoWvS2mp0cUS8ngSKL21NHq8eP0w6m3HnEk+W7NY03MATCLrAEqi3x899cXfX+rc cHFw== 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=KXGoHQlndsZYpC+2Fg1yVTBO0BxwgIBuG4BeTChurCVgoKJSuAwzGZ3imv+m3FaaX2 7N3Cm8zNh33HbPfqYuEvGP/fQQ7Vm7BEM25y9Mw4cFhkvKieya8c+P4rTh5jPCehhEBZ x6YLUHdMf/2hiOMRxsCXroNK9k9aQTbfsWlbshJiRvPMWUqZ4xot2Z7JtMXx2c0mKNYU B96XJQ0RNTLRFJoCcRWKBDDwwv8//ff6fwcyq92AE3J3w+GyCAJXdd81gGwVX/9FrtTk +Q9+G5F0j3W+Cj1Q2O515EMsNbafbfXUoAoCjTwjIH3ddbv8D15I0AcwqNZpzntFTozk 3z1g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HOm2qYCi; 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 71dfb90a1353d-51e4ea36b15si1703221e0c.1.2025.01.25.09.05.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:05: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=HOm2qYCi; 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 1tbjZb-0001e0-FJ; Sat, 25 Jan 2025 12:03: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 1tbjYn-0000ft-Ep for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:03:12 -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 1tbjYl-0000b5-QA for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:03:05 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-385ef8b64b3so2665965f8f.0 for ; Sat, 25 Jan 2025 09:03:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824581; x=1738429381; 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=HOm2qYCiAxmpTOwVpfwkws28aLajeLESxXpkP/xqbG3BXEl13EZy5KPncH+onofTUC 0LROrj9mZc88yj0I/tDGLoQf/sFuENaiMeoKtcbcclzfGYFDzz7pH56VAU11VY6IiH+B VwX7QraChTqSt2/x27eC/BF3XfLr4oiZcjuzG7pQZYr6UFRsjkKpHGQRHNvSb0AS0Dqc 1e42A8QNiWeOD/iqIZW2ZG2YyzTM0ZdZEQoSsd10wWnxfb5kmPSGK6JXAgYucvxlKaXa ReXPLerK83TtXpG0SvwMjWBUOaxXwyrs3KYcYypbDWc6AN9Dv1bqD0NOkTKmCMx6Xv9g z72Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824581; x=1738429381; 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=h3eL21V7uXJvGMIx9D3Mb+NIyKIq0x3T2DK/lscvmsvKvHB7/D6DwCbt2d2HOJYsKM 1yxavG1UUVUirPWyPIEQNhsYDIrbIBIXdgTPXM2rvDqcVbZHNu1OEyfpz1dWxuJwVn9C M/oJnHfV8c/GZmDiXbMWfIXi4x7JSpGGe2CYdEsNdmzUDthslaUQe8aJmE0Ho5OX9Ifc TmJ4FoAmyooS+pC7B5jqLnBN5AKwvZhFtI73eI8fcZe4ajHX0bXgr3JmAyuoP5+iYQaa dERXV5cWK6Bu6HF2AdtR0sQDRRhmQlPEIwgfY/Te3HwJAp1l60oKQNBSvqooVlFxVeD0 7/eg== X-Gm-Message-State: AOJu0Yy7LLbGtymeELA4dJbDGnTqMH5huL6T/gaIoS8mrpaiEMEgK/AU nPj0g/zR5uXw82Eccnar8sYQSvpzkbMaDP0NEnY1QsC5uJPrNSWwglL+N1/ikhm1+xKCVmG6g8H NAhI= X-Gm-Gg: ASbGncvJHwg4OByCwqsLZ2zuYLg/wLR1KC6lAnzu3XRlgCCltnVAJbW8gi5/HdsfM76 6q9hcce4Mqazy3ZJmZXIvztVz4rHLxVnwvGyAtK585nhkiynecabQdmQQhz16budzgJUuIFuS73 54Gc7a3m46J74iVyPDO+xZcfj+f9n2Ja9P5RR4NlLS1pnQfEaSz9GfzqeTT8H1uWEWzf5CCogG8 bE4V+cUYPmSGHqVgs4FhJGE4qKWSZB88PLoNVTejd1m4b9A0/7WmnztndJHDDckbWi9Xtj4XUvt ubEozWC3mfL6z4ESs600oTjd+8XjEFNe6o6bcrU9J26DlQVOXYgRgUY= X-Received: by 2002:a05:6000:1548:b0:38a:624b:e7fe with SMTP id ffacd0b85a97d-38bf5655d9fmr28413797f8f.7.1737824581494; Sat, 25 Jan 2025 09:03:01 -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-38c2a188c33sm6106598f8f.53.2025.01.25.09.03.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:03:00 -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 v3 19/24] target/s390x: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 18:01:20 +0100 Message-ID: <20250125170125.32855-20-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-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 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 17:01:21 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: 859817 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1338744wrq; Sat, 25 Jan 2025 09:04:38 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXZNQkL3kM/ta+6v56VzqAnlUNlrw/Msws+8fVRBEBZyoa6ZdKsAHRxuf8SS0/biFDh+GCD2g==@linaro.org X-Google-Smtp-Source: AGHT+IHXlxP6ZLFIiEy+A/puU+5SJDC3+/BRWqeS1rBOjeqSLoAxENwkpPnVgq+b65vjEPQkz9EX X-Received: by 2002:a05:6122:1820:b0:518:9582:db90 with SMTP id 71dfb90a1353d-51d5b376e65mr28578997e0c.11.1737824678121; Sat, 25 Jan 2025 09:04:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824678; cv=none; d=google.com; s=arc-20240605; b=hfp3m8Piurinp35ff7WuzCvAizSUsBP31sVBmJp6QhtcwNmQAoskaA367BzKgrDcx8 5qcklp+gkdo6cBU2Rp474rbWuCUSVnNUTpgGDwjkj6Xm6QaKbYoDQVf+O+zOjJYB9R5d 9ZlOd0/Lkz5QYf6dZY9ixmGfC1KpEHknKxbjBl3vCNcP0yLZNvoEBOxjaOX+lF41/TeV swRLy3enVNbzT0upER5SIfzxxJ7LIcv9i64kFiI43gpcRoQDNcmr1mUZrzMCk+Rebd6R rAPkKiBbHh5I51AbXqOM91ucq3deKDZHzIcx88JeulSOHHQ4f3x42rGE8dWc1ZZiDfxd Qagw== 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=XCT4jN/vYnO8vVCJ1ySt/bdTzAg2jwH6qz+Kamlu4iwaIahtLiAqSAA4ckSjmuEvIe I43YBWV7j0Skq1wMzkwD+P5EhozQ9iUveeUXstbGvwLbMVe3r7XuQYmdoRXCv3JZZg51 ys7gLywaUKlBsj1MlEz9mXLoJtxH4J6BTTyDp2bHvgXGAWXbeh5yLPlvlMS2Dtcc3qm9 mw96myB2UB/IdLJ5h+7ciW5tTrX4kXCxucpVTsG077uotdgbVWmlKS25s8dY6oz/yKJP N0yIMri8TiSJVIAKJONozmf2oTnI89FWMEQzYToPmee90lqgu+zqF7tZ+MAodorNvVMv jA4A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KDEzypIc; 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 71dfb90a1353d-51e4ece8021si1714316e0c.270.2025.01.25.09.04.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:04: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=KDEzypIc; 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 1tbja0-00025j-Gj; Sat, 25 Jan 2025 12:04:21 -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 1tbjYr-0000gg-S6 for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:03:13 -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 1tbjYq-0000bi-Ft for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:03:09 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4363ae65100so33566465e9.0 for ; Sat, 25 Jan 2025 09:03:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824587; x=1738429387; 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=KDEzypIcXrdoCIYcpCPP6yYxhl1MT7p9KxqvgOsHpzd9eJG4njXzq5VidXys2KL6Yq EooTy+pmkOd7OCDDBVQmhnpIF8o4hRG1iTH8X2fJxm4e5TDR+kOUWF/sKjWLl5lBtqYn aIqMiVifgOt45viUePBzs0yEYF1dE/WAvmlbZ979yZG9JOpgATwthgo8enkk8od9JYrM 6PJjFMHUoAF5w9x+GAsV7CvCx7bWHZkI/EsaVlTGnTk5rSFwulKfkAlPh7uELQGH2XeJ jyztagl7X5jO7ghFbheUECdut6QvfZIWCcZ5LBgws29kEM/f/9ADw/cPaVQUyMeEW35L XdOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824587; x=1738429387; 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=wJtrFsQPk41MHn0sfMHIOSplgbZilp2u5DYVZXsJl0A4D9beVAR6JTR/AsuSfgVLn7 ZQ++CewR4lGQVT53e6iRTZgOxDGe58do5AwWTqZMFgh9fZmM2PNz9LE5Az62BWijzU8i wJ4p1/lDTSuZeuvNVckiQ3HvxTm300ZfDWbBznHCy4LJJX5j+pRVaT3qzFrTU5tpBR/8 o727OH2gHmavIVRVtdOOOtro9oIpGQF8fr3ta9PFLC+ldMGjkpd/cAqduB2lcLPRCPy3 y6wpY73K2+OXULQgDmgNu3gPiX6gf4niDRgm9ZRswpu3kFMsUX76xybrHS9ewMmoXjFB 4L9Q== X-Gm-Message-State: AOJu0YyBmb3LELvnUjTLpSo3rLocrZK8cKSqzIFlDV4ffmYpHl0Rqs/d G9KbPknBzX1UHAi/YgE4s6PalLUqmFExh852n04IKgQC8qVEKQ91Qb1xxkyVfLAA9MPJIvzuNCe J+pw= X-Gm-Gg: ASbGncu5Dm6s3//Pjgtr9lHXZkuVYPlQLWe8AkofkBcu8R97fktuEWcOX0Zm1MhLiEq OJnwaN1VsTJsWCk5Fs3fyz1DpO2c6oKOEQN62oujxJyotyOPnp2BnkAdjUMb2aS/R1fz3HUXGHF zT0HdRMJoX6jVGrg4OLCWmBzC1XKtKycKk+LEaJSrXsVjog3xI3wvBkvGQB5LlderHILYY4KV6V wB7MzOx13SpbPgeT/HKUumJv21/g38lnfxqxHpxb3lvATj5DbjsJfx2AWRrlT+sv0AVSnLCcnDX /31mlvoVO6ebEtudCBKwJ74V/56vHBH2Ol4s79/3/vZ7iZEel4FOisI= X-Received: by 2002:a05:600c:8712:b0:434:a802:e9a6 with SMTP id 5b1f17b1804b1-438913ce0b7mr350273185e9.7.1737824586746; Sat, 25 Jan 2025 09:03:06 -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-438bd507dc9sm67320765e9.19.2025.01.25.09.03.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:03:05 -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 v3 20/24] target/sh4: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 18:01:21 +0100 Message-ID: <20250125170125.32855-21-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-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/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 17:01:22 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: 859827 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1339578wrq; Sat, 25 Jan 2025 09:06:20 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXMWJl2apQ1uVO2B2OfRBDcaVzSBZl49MSmRAlcfxwmV9k50Et/NrpyqNZ3R5EgMC/36KVfRw==@linaro.org X-Google-Smtp-Source: AGHT+IFosC44Pi23Y5ONZVvoagC1FnjTu/PdbcXhPkiVc6yLvhwuRynu8E4QnCAUW68wsKZHuy3D X-Received: by 2002:a05:6214:4b0f:b0:6d4:36ff:4356 with SMTP id 6a1803df08f44-6e1b217dc6emr551779366d6.19.1737824780482; Sat, 25 Jan 2025 09:06:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824780; cv=none; d=google.com; s=arc-20240605; b=TDUN+27e8fb5DTlid4N2AI90b/ealgOFHA70QcDHzUr2Yj1EIWx87loMtku3iuPVY7 d8qJhnxE3TfzNR6mMNe5nPrgCcNGVVu37goZg2QqR01F9XVHKiKRp0sXt1SkUwUvMe2h 0CwvKDO1LDu5W7hHgb1IcCWjxd1mUQprU2Yfih+tBCv8B5zp7ag4zxnjnFwzMr7z90BU EBxLbtxXb/N2caCU9PsjucCBvAu0c7AST13CSY2zoM1MRdt1V/Op1Zg89DiBG7LwfGE5 1WylaNglkImsZmIns0FExvpAk6Szztm4wi1Wjiyb/08NrAlTLGlv/4vPlM7Ess2hScUH EaMw== 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=dG+TxCbPrKVqYqmQckpN/QaTZHT7HSS2W7/Ku40aq5pauj4m6/Am+9RhuVY+2lV7zf 8O1U+EsdvQ6MCJT/4kn5CKPKdAMGZDoDsidbT1EXquhHVl134+SxrfgAzrKV9nMTmidL 8LLlrIr7VtK1pQz1nCbKtJvhqzvJNSwTQgL3mcuQVAvrb06WH3UfbxnTccCjrGnO/O3F D721YOgc01Wn2bWsxjEneexsJRt81hYRDLnXHgK0Pw6vhMW9/mcBPpX0KLMMDdZX3UGY ibyGOLAWJ5s2DacI2bwAy2Ci1ghdKBmV/xpt187awx/4az55EaG1gBafCtkq/5gD1YH7 S8XA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="nuh0g/kN"; 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-6e2061290a9si53617186d6.442.2025.01.25.09.06.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:06:20 -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="nuh0g/kN"; 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 1tbja1-000275-T4; Sat, 25 Jan 2025 12:04:23 -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 1tbjYx-0000xT-LS for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:03:15 -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 1tbjYv-0000cG-VV for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:03:15 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-43618283d48so21881595e9.1 for ; Sat, 25 Jan 2025 09:03:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824592; x=1738429392; 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=nuh0g/kNJ2xzsMnfmBWbxC3rPkpxT/BcPca5FxGH3Edzn54r56S88Wy7nEQNwRQV3Y WQjEUZGWZUMiog1AxlJMxi3XTJUHFEgU8qGFYrs3/k/OjSTBupbqcfE6Zzh5wWQoA9I/ wu86gmJSG9Z7LTNGMP1SvBMbCq8schHluC1SnTEUaDNFlSFl8hiz11yaLB+UDlum5k4+ QvArMLpWOD4Yz12JNwhFKIAo3epbx1+ynhphTSpoy5++dSE3EdUT3gs0WQ+JgKwd8ZsT vLWh4+NYezpIMtVxBEUcstNNdU7hQeg+hwecQDrHE634ty/TY82+Exxdbeci29UWVHTP 5hPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824592; x=1738429392; 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=DZ/75B+wURV7jR04H1h90WNTMzn/7jv7MCcSCMiak0CTug/uxtbGfxH5oWlSVowZXD 0pXIx9vsQwSjno7Eusvd+hOqChjPs04GhUbSmvufq8f9xIGlR3d1LYDMDortPeMosWMX p4t+bbAHic4K4bZiTssPII7dk3OXuqwvQi+z559H1/Njl+oPc53AU84kgN7QdBJfLDpn bDgU+Fwnjlm7l8WwOgUin/kqRUjaIGfH8+5NvbFUZ2iT5XzBeX6g6q669q+5+VdbA/1d oxPnVyUg9LgS3DeNQI6qmSO76nOmYq/rfsaP0Xmj5DxfIvWIk3eJN/8qBQDQMUvqXkeH 39xg== X-Gm-Message-State: AOJu0YyX5NwH7sFNnLIxzQN7jo7FCb5yLnd/kKPA63YZxbPiycnsCP+M bW5DK1dg+qoAg4xMdlNtiTd8nxx6ObpTm+hwS1Q0lz+kndVKdUPTgh1Gp9mdlBgHqsNwdTJ9zBj CGlQ= X-Gm-Gg: ASbGncvAKfdfQNpxmjymWd46WsjDXXfJZUNwtzvnx9uVHI9l/mfyI/3Wco+jXbKF0q7 LTe/f10NhMqL+sXaIrFSPWZGjvjcg31PUkqk1Pq3UOdjMHW9S6XJ/UbTNMK6uPgZOfXzXtBhx8D iyOVOXKgkXHwf4cZ7QktBUifS2SJjBCMgjaSq0xWO7eeKX3PGBb+ibBCDxBYx0Mixb+qidOCXLD teg4M+ZKk8IXPcN2yGhj5XX/JS5NGHHkTgiQRz3DgIkzoC8vukLSbAg0rB41R4CL5GyQXhb+g6V OmReZkfiymIjp7VcDpjO14OlDfLjtENv0kPh6iFfK8fRMk6ztlveW48= X-Received: by 2002:a05:600c:1da8:b0:434:a711:ace4 with SMTP id 5b1f17b1804b1-4389eca3ca1mr338915585e9.17.1737824592051; Sat, 25 Jan 2025 09:03: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 5b1f17b1804b1-438bd5732edsm65694935e9.36.2025.01.25.09.03.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:03:10 -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 v3 21/24] target/sparc: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 18:01:22 +0100 Message-ID: <20250125170125.32855-22-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-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/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 17:01:23 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: 859833 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1340368wrq; Sat, 25 Jan 2025 09:07:38 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV2isAZ722BRr9vpQeraco1AvXoJUJc+Y32gJy0ma81v/UMSBvv70G2SgN5PUje5rWAp8SfsA==@linaro.org X-Google-Smtp-Source: AGHT+IHWYiLoQhIC4dKq10AjHou7be75A8USAEhhnuJzZj4ewTZIh41ss2C3E6o3K86HOHzYhq9g X-Received: by 2002:a05:620a:258e:b0:7b6:dd7a:9709 with SMTP id af79cd13be357-7be6327964cmr6106119585a.36.1737824857940; Sat, 25 Jan 2025 09:07:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824857; cv=none; d=google.com; s=arc-20240605; b=NAPiNke+VmFuafBr+5RVNTJV0Sd3u99S66zRpu0w0KirWLxfSNowICBtMyiH/nNMD6 RaPnDlL/QbnbhSrKN4atdOB0JFzVX5OaJ+FLS1UktqdaP0LZNSj0S+14S0m54tNJu6TZ elLdUL6z7Xfat2Ys6i0m/5UirLR1X84O3cV1QmCDPJFz6ZvxxV0+LLyWHj/QqaocIX98 QWn7Hh5Wn1RJrzxBgcBFcqWbOibFz7rWR2dlUdSll7T3w+gw2mHxDp44LCVKC/uTsx8a HTwcI82JvEU/Z5A9/A7exUDoiI3nBo69psVduIHAJHKcVNkjvY99Kk+8wuuaNXrok1y7 vExg== 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=kOzJnlWC7xM5a+Fe2vYqub3yOx4YX0ja0X4CnILISssdGJDyzNwcZIwhZ2E78bB0zT zvKUJin+lEnGr4xjoe1et5s+Qg3MKaymNYgcIVuJm/UJ57PH8yb65lU/O3HTudajeAR/ QwbZAd6gZWdCanUje7CHuDsaLa1PR/hScGAI0sPpkbnGHfnFKtD2I9n4d4DPemRUTk3Y cAFqQhOmtmW6euJRFCQ/rQ+6P/+vQsP7i0TTo3pnqlV0ms0xmrNeaDKv5jdvkoc62Rp7 c+XFRbtOxEq6+31O5481XZ84Enpw69hvC4dQj4FixHbnZYjyJZux3L9jKfDX90ydGf1k hgbA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=daTNnmdr; 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-7be9aee1681si502078185a.235.2025.01.25.09.07.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:07:37 -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=daTNnmdr; 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 1tbjaP-0002fq-3A; Sat, 25 Jan 2025 12:04:45 -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 1tbjZ8-0001Kp-6J for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:03:28 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbjZ6-0000d2-IM for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:03:25 -0500 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-385e06af753so1663991f8f.2 for ; Sat, 25 Jan 2025 09:03:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824596; x=1738429396; 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=daTNnmdrWymOI3a4ufZq3/YE/70jdcWkWpnKOA1oKerB7syhRZlwgJ592ngJ4sGHSd EyeJlnXBfkp58wsrqgDa3MmwlwoC6YG1hZnfztCb9xFUZm5l/Win/E2AQB3fdFHJikFD Oo5WAPEZaVC4iYTYbNYmIJJDQA3YdAkRH7jyGFZ72msUjsSJ8e5yJXH1gAjchJrbKblW QgwznaQ6TQsu9YZOa8PP9DNm+FlaLlIHtqavOSurp24vxLrNyjhfOtyWFHaIgCOSvbh+ kyItlRIZNn9gi4oQRHYZL1Oi7Z2CTgBr8l07jdYDM/fwl/tN+T1gXIEKNQSJHJETnxUA uG8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824596; x=1738429396; 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=JbBxSsxbAo5ujqC0I7Bq21wB8COnqq8SSL6WxQ5e9ijW7AckVkahGWPydp7gdgUbCx 35OeBURV4W24SJNsHkNMdnbcKQnusDH5yKQPo+eJxCgw2ImmBF9qHxYFVji/bBTTf70l 0T/kFvdRzTajfu7GywuXYrMt6eLCDoKZdiAEKL8bJY8siD+wosWYCRJMZXfL3tb+dU8n kvNf+WLSUrJfX1H2C4Na+BMdt4gKGN4qs8W10t671mYoPgNi5w78ofmZdYM3sM1v67yf VT+RT9wyAfj1rt3RireLKBr/+99Tzr8xtkKWh8euXnXxyUrZ/a0DwZ32mbfPQJGVCE0A F8Dg== X-Gm-Message-State: AOJu0YzH6r3rd0T91ZrcNnm1x2v7L9D/h9fD+ASx5PLquwzBOy0X9evM wVFkaHSH/h2XbRHUx0hAc7PSY2v5uVsPXK1niKafxxDgAKOWaXA+E+OwQu83hoHMf46LJMf9yZl ZjK4= X-Gm-Gg: ASbGncuQBp+QJCOYey4sOTaz5xG/R2IRnfXQaJphda9fxovMI8Zi9TsNQOLiHIj8BZr p+eMqaTOK4Q7gINOSX/s5YoH1QcKRWKyaXWG2m6PMl2E2SlQ95TkFYywnmWBCerv/QvpTyEGCE0 9tqZI6oMBukLvAD0DPDhry/BFF+BCrXeBFDLu40Lm03mm36x4bCWYHYUZdVTmLE3sArP6xfDpON XFCqM3D1AdTJL32xMYAIVhC7cF4HVYK/wuAdGczYU87R1lPl288O/EF1R6cfqYimMr5NAY04RjU wGsM9+OaiVjmXtRmGsUhA9MkzZd4PYzkRddex1/db9o4yeBspHAPepkCG8lwkCCwcw== X-Received: by 2002:a05:6000:4008:b0:38a:624b:e37b with SMTP id ffacd0b85a97d-38bf57b642dmr29881098f8f.53.1737824596562; Sat, 25 Jan 2025 09:03:16 -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-38c2a17633dsm6057072f8f.15.2025.01.25.09.03.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:03:16 -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 v3 22/24] target/tricore: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 18:01:23 +0100 Message-ID: <20250125170125.32855-23-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.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 17:01:24 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: 859829 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1340269wrq; Sat, 25 Jan 2025 09:07:27 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWsGF834e2eUc8ZYakJVRum/m0LH3yzCJdRbKr5cij5sz7nO7Qz65sEqa8Vy7a76gZoY3VBMw==@linaro.org X-Google-Smtp-Source: AGHT+IFF5JeVUtDjdkaFsJNS12AlJVBu7uIkgoJBOBsjhM31tV/g3FUWVnQP9O0vcaJJsAlo08Ow X-Received: by 2002:a67:e709:0:b0:4b1:3709:9361 with SMTP id ada2fe7eead31-4b690c9a9a4mr36526071137.19.1737824847510; Sat, 25 Jan 2025 09:07:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824847; cv=none; d=google.com; s=arc-20240605; b=ihG+CkvcBpKLDk/OGaO4rjcdzg6sb/XVji2bopaxGNZzqDFn1xfhulb0b5VwuGIaC6 qiKqoNzLrgU8QhdnxMOKWTnYI5N/BO/PJl8RCdRbuZLI+NvoQ22NgU4//hn24i7i6eu6 /gVLUBnjrRLJTzMHlewuyzhWMmloeLf1xL9CBTohNsBN0OhRvRR2d9vUoPpY6x+XyMLx +k7l/ZsQLxKTXjCblikGP3RerR3VakK3NgEw//S4DO4M2lHbD73cIdYaxKwbyTvp/yhw 4Fh93MWAcux2JU/NHK6/t4yS8cWdJguRY5778revNnBw5Qv2nTYau2cL2SwzRR0CGvsc MVqA== 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=G+SSWFvboiGiO2PFFG6NwEOM+mPRvyPE/MINPoVQkbwSV6cYSS58QPxOO/ZYbzYHqo 5TPGLUQf6lFlABL7EGtlhfNAlEYbM+UTrHla12N/cjvHAinpVk65ib9bl6F9wAHGowZY pO2GHbLz4D1bGYCXSXhMW3FNwWYS3d7ZaECRJZUneIWrpWAyvamLJjeH0G20p7JHdWwU Rcd8/wM59teqMoxtuim1BgoH4nw9wr73xv7hU1uu4LBa+o0U12QWZ8uorjKjjl3vHTli lMOU9NDSlqu/1wmgK/nnk9Cul394asuASyfN5BT3L4sx6SR956knLRob78UQVWuIpc5A kTwg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rHJKJoCA; 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-4b709981b7fsi1700810137.258.2025.01.25.09.07.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:07:27 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rHJKJoCA; 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 1tbjaO-0002dB-Mt; Sat, 25 Jan 2025 12:04:45 -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 1tbjZ8-0001LT-8Z for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:03:28 -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 1tbjZ6-0000dO-Ia for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:03:25 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-385e1fcb0e1so1511657f8f.2 for ; Sat, 25 Jan 2025 09:03:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824602; x=1738429402; 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=rHJKJoCAVg5Rbx2yswL0xGHxg5CxDn36g3kXFPxPCenmJPX4gotKOmmLtzjo1X0+sw /Jc7SJ8lm274ku09Zb1rWYf4c+ZTz000yjktWH7RDXloUyO2WtSI9BMLe43gTbzisS2L GRhkhXpNjuez2QTFcOmP/bTMXzu4OOV4qnkprFPpvFgTWJSEolP2ZWG2BTa4e6QbTcUY 57Av3taKdJsyefBMkdYgW7maEqtLtOxG5VmDGWvhUq9le/khWcyza32KusJZR2tvAYLY 1ImvXVgKsdMMZH9Uq8HxilaFZgP4LCeZEGBT5zibI0CVc+18GrOkpJtjrBSw7f7A3XtZ SXEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824602; x=1738429402; 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=fVGA/b27BH2/6rQTKuiNGXnOUz2ESHR4YKs8nWjStU3SShF8d6YFG51Q47Bq+i7sbu ZJPYV7hqDoc4ZKKI1hYiMjHwZWe36UaeOeOlRoLmfZtKjiM9oiqTh+Bkj8L4ExRzRLVJ 3Jfsk6U/9M3I3X+3LAuOAgJs/DIjn+hfGpzRgDzM9xCBxyNCB+rVdzPO3Tzqt6KB1Kpd B8Oogi9Jq19mGmueb8OO6eImvWvvgUyk37K2ybtBM2DxeAj3XL1mYK43DNgWNxYgnKzc wHdeeeS+poYzFQOlfRkmsNTuRb9hvlU6z1VIgJhvdTjy8bKUnQfZFhR0ijks7Jv7bDmx Y3dA== X-Gm-Message-State: AOJu0YzyVSyHK56J/sknkQ3uFedXbxzfUfawPigTT5TheB6tM2jKr+l7 n/2gSUgtwmIL24rmLgGLXJpb7O1og3sqDsaudqa30Qgo4OLADSKxBDU6mvfLFPHqAj0ivcjFlt2 7bns= X-Gm-Gg: ASbGncvz4wN5GgKqAi2I+B2BTXsK6g7AJ/FIRLJIvVJrIT44ywS4YYqcwnCTst1ixkT IgAuBrhGvluZ2pYRxc2vUXaTyeqVZnF2o2AbMZfAknRjpUHki6Ge9K7wswzMnz7EXwYB1YCUm8+ ly2iCVXyoUKqr883Rj+unsaPXCuRr/v7P8yUrev7JgB4hUYfDud0djqa4YPas5MzH/9usFDv4G8 GWFM2lR44E5P/4wg3aSVHcv8aWYlqfpZ6Dwob4SeYXqjj68PSgIMy9IpVS2NfRomqv/lioQCuLD gt+trvOGUqf+u7tDLolsLkkFRabrHnjiabr7oFikmrQSgvnwlRimE5A= X-Received: by 2002:a5d:4007:0:b0:38a:888c:7dec with SMTP id ffacd0b85a97d-38bf5675e61mr29143662f8f.28.1737824601802; Sat, 25 Jan 2025 09:03:21 -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-38c2a1bb040sm6018422f8f.67.2025.01.25.09.03.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:03:20 -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 v3 23/24] target/xtensa: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 18:01:24 +0100 Message-ID: <20250125170125.32855-24-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-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 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 17:01:25 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: 859832 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp1340320wrq; Sat, 25 Jan 2025 09:07:33 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUA/iX/CIq1IsXKY5zX2U433MtH9WYC+kINHxdrJflS3qr7o4Bnrshm7XJLauCDAWNOGU94Gg==@linaro.org X-Google-Smtp-Source: AGHT+IFUdNBxV025HqZU9DsK0AXDv8f6RBdQEpXQsmsxvfN39o4dlqVWcy2pEpCK799UwBeH5ppz X-Received: by 2002:a05:6122:6090:b0:51b:8949:c9a7 with SMTP id 71dfb90a1353d-51d5b374dafmr29355166e0c.8.1737824853597; Sat, 25 Jan 2025 09:07:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737824853; cv=none; d=google.com; s=arc-20240605; b=B8vkMVeXGMULMAA8lV9dskCm9KTuTN+K0XDHQjj26lIp53/wQ3Mha/eo7OgsDu/38A cWB5v30I53P3xLHhQ92tJ13B/iYt4esDkuXeAKGV1mM6j6j4aOBildoWN9oT+4ZM3K/+ aDg1slnxUo+DV+rc11WVvoIUWqSgLV6aRODaGvFTVs0DgQDENI9uci8PSRHNgkOk2OKt VwF54munaE+VmGFk1ekiQXbhvVvw6PAXpY9kZ+V1HVP8Gwopq6Wnefp7ioQlXm3oynUB hp6l3uqQA+C8LZaZKWOWzTXytXK9Gdr60wDpd38lVBSOIHA0mz1Oqr7AMBNy9lQpqWxK ND2g== 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=Rdb0ypEDsi4ZAVccAGxZ8eIstaDxtSjHIYFijJWmmFk=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=emy+HBoPnMaPA6SEhczrOHSqUnimrv9psiSlUO/nfFbO+oKyTrQuyAHSst+AGVkT41 LH2OJEBiW/GfJ788J1Bsj2XyOwNm/08PTkU2fasIr7tKwG4Dc30VZL4gpr4dZVC6B57v TZ5YhZ2TIlVCCu5aCGRvmKIX1yGsIp+2rD+pgSVjG2XABwlJqFrgiTqTxyvFn5lsIEFg 8abQ7bcZciv5iGz+npPPjyIrYWD3fde4vHgQYpFNCleYBia0M58swlnd7yHWnwtA0hxJ nUJ8H8TGo2nUjxHe6byqxR+tqPw9dY311HC7C5/AM/H9JqBgXUpwMH0yuaZUH6NSUyrl oAXA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gZN9ro+a; 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 71dfb90a1353d-51e4ec82610si1645994e0c.200.2025.01.25.09.07.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Jan 2025 09:07:33 -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=gZN9ro+a; 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 1tbjaO-0002c7-B7; Sat, 25 Jan 2025 12:04:44 -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 1tbjZC-0001Oe-AC for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:03:32 -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 1tbjZA-0000e1-8E for qemu-devel@nongnu.org; Sat, 25 Jan 2025 12:03:29 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4361e89b6daso19837935e9.3 for ; Sat, 25 Jan 2025 09:03:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737824606; x=1738429406; 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=Rdb0ypEDsi4ZAVccAGxZ8eIstaDxtSjHIYFijJWmmFk=; b=gZN9ro+aReynZHixvB9jO1ExtoYZBPAhnne97zNXiTCY9OrZ3py1Sb0wsdk8uV3SeV lp6EElrAkqpbZRpff6NcAv/7WfjbbaFilnMpWCDJjSeNGVq6xKOG9b4iUc9N+ZowRpfF nNjuOtpeyXFX5dBWNbiKu2F4K6oz+CEfTNjwhBtjljJIl0ImHd8As+FK7DoT60OcmJ+b 2piTUhG4CQXwlcG3KQLUISI4zyY+5f1e5WCl8ey+PbByPDCyZ7oteQPZ+JyNcITmD0K4 hU1oV7ex4x5RI3deucWWtwncyRsSEYyIMIFXWQQ+7X5JZeUj+sGxZPclgAoyRB1eDlGy lTKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737824606; x=1738429406; 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=Rdb0ypEDsi4ZAVccAGxZ8eIstaDxtSjHIYFijJWmmFk=; b=ukogzRxZ4zWlaMutYj+u1uDx4wA8CwTazcqUXYxeRIDyookIpIqCP/BTEGBTH6+In7 vD8N5O+nTGrz11FLuQz17IQtTXkl+eSOmoduB1E1ZyzHgO4vl1hojGb7dolgJ+WIz3G/ qXmESwzbwetxczQa3bkipnpjLn0lhCOSLwFZJPTXp4z/ngSK39237DFj9C06jKhH5WVv bs9EYGEIj/r8TwcwUtOhLYRbXNGXxXZNGQkaR+Mp8rxNDoZKvCNxyagTk88tQD/DH7dn bX/TLBoRuqrBuDeO355cW8zLcisvJG3bBcjGCudYMHn5+e1MKQy+WagMkW9H6/PRiPVh tZtQ== X-Gm-Message-State: AOJu0YxupJIJOEF1kT8rxTW+5ZjlNeM7UfrzZ62KTis9zjboO8CM5Lf3 YaOiHAteknPJPa5/SMO0aYMPkOQiQQZLYrIgu8W9Bl9Qd27Q5kpCV3NXRXe4opX5S5gYnSYUx/5 ZuII= X-Gm-Gg: ASbGncuT+i4+BTFQu6i+Fz+UvU4W5Rw6MSTwtGvuQlhhkmleh2pV4bSerpcxW8KW5TS C9bi5o1i6SEuTM75MzOXqhhOTHhtOajfsbv7B4LylmQhaL8mryuei36nURPZVfmQ0irjtOMNqK0 IeSngfeF//E7t1W2NNkrkyUC8dYCAN7T9+OWCyX+U71zV/dZ8Vq0P1RC4vuxfGmIILusr4qg5hD N6gWgiP71d5by2+c/7mQe8l6nhqdJ/eTqxur6iSRFfRkBd33rrgTRwvoOZwUlRC7LaxNz1zOSU6 8tPwayIEMZdyOCM2w2yHDNdGaNX+IxpUFamIuuaa8h6wo1clRN2PgKU= X-Received: by 2002:a05:600c:34d0:b0:434:fbda:1f44 with SMTP id 5b1f17b1804b1-4389142e805mr294675485e9.19.1737824606342; Sat, 25 Jan 2025 09:03: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 5b1f17b1804b1-438bd54c0ecsm67553925e9.30.2025.01.25.09.03.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 09:03:25 -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 v3 24/24] cpus: Remove CPUClass::has_work() handler Date: Sat, 25 Jan 2025 18:01:25 +0100 Message-ID: <20250125170125.32855-25-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125170125.32855-1-philmd@linaro.org> References: <20250125170125.32855-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 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 | 3 +-- include/hw/core/sysemu-cpu-ops.h | 2 +- cpu-target.c | 8 ++++++++ hw/core/cpu-common.c | 12 ++++++------ hw/core/cpu-system.c | 7 +------ 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index d64c823e768..42795f12290 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); @@ -1154,6 +1152,7 @@ G_NORETURN void cpu_abort(CPUState *cpu, const char *fmt, ...) /* $(top_srcdir)/cpu.c */ void cpu_class_init_props(DeviceClass *dc); +void cpu_exec_class_post_init(CPUClass *cc, void *data); void cpu_exec_initfn(CPUState *cpu); bool cpu_exec_realizefn(CPUState *cpu, Error **errp); void cpu_exec_unrealizefn(CPUState *cpu); 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..778f622b07a 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -230,6 +230,14 @@ void cpu_class_init_props(DeviceClass *dc) device_class_set_props(dc, cpu_common_props); } +void cpu_exec_class_post_init(CPUClass *cc, void *data) +{ +#ifndef CONFIG_USER_ONLY + /* Check mandatory SysemuCPUOps handlers */ + g_assert(cc->sysemu_ops->has_work); +#endif +} + void cpu_exec_initfn(CPUState *cpu) { cpu->as = NULL; diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index 886aa793c04..eae621f942f 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); @@ -319,6 +313,11 @@ static void cpu_common_class_init(ObjectClass *klass, void *data) dc->user_creatable = false; } +static void cpu_common_post_class_init(ObjectClass *klass, void *data) +{ + cpu_exec_class_post_init(CPU_CLASS(klass), data); +} + static const TypeInfo cpu_type_info = { .name = TYPE_CPU, .parent = TYPE_DEVICE, @@ -328,6 +327,7 @@ static const TypeInfo cpu_type_info = { .abstract = true, .class_size = sizeof(CPUClass), .class_init = cpu_common_class_init, + .class_post_init = cpu_common_post_class_init, }; static void cpu_register_types(void) 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)