Message ID | 20250125170125.32855-2-philmd@linaro.org |
---|---|
State | New |
Headers | show
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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> 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 <patch@linaro.org> (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 <qemu-devel-bounces@nongnu.org>) 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 <philmd@linaro.org>) 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 <philmd@linaro.org>) 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 <qemu-devel@nongnu.org>; 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?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: Richard Henderson <richard.henderson@linaro.org>, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= <philmd@linaro.org> 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
cpus: Restrict CPU has_work() handlers to system emulation
|
expand
|
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.