From nobody Tue Feb 10 13:01:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1630599380; cv=none; d=zohomail.com; s=zohoarc; b=m/QFUvNWayNAhtOHxFax3IUVFyQmcVk+D98aHQRQwechAlUGe1UibCdjvqWor2geMktkmcQ7V3UPjUD4qLl5xTVvPYvrd+8VJZOQsF8ml6Ecip1zSq3Xw5aBdPIsIrtNj0UMr9L/f95pGDbLDb0i/9ffmEK9VOjTSVBx8V2YbeI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1630599380; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wV14RcZMLIQqRNfbc2l4krY7RhS99j63lxSZtHhlqHE=; b=B4d4YA4OJ3jyfeQ3AOKg38EaA06APTchYr3QlXX9ugW/+ZvNZBi21ZBX9QgL+E2S4p/PaOBa1He/dFzcCaEfOyXhoDheCaSz8ecUx+If6ZqSB0hGSJH6E89EhjlmbutoorW66azwBlK6ESw9jIWJOsMha2CEUym14BBz+PJvvI0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1630599380622978.5541791401083; Thu, 2 Sep 2021 09:16:20 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.177413.322832 (Exim 4.92) (envelope-from ) id 1mLpNn-0002Cm-Hz; Thu, 02 Sep 2021 16:16:07 +0000 Received: by outflank-mailman (output) from mailman id 177413.322832; Thu, 02 Sep 2021 16:16:07 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mLpNn-0002Ce-Cv; Thu, 02 Sep 2021 16:16:07 +0000 Received: by outflank-mailman (input) for mailman id 177413; Thu, 02 Sep 2021 16:16:06 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mLpNm-00029c-8F for xen-devel@lists.xenproject.org; Thu, 02 Sep 2021 16:16:06 +0000 Received: from mail-wm1-x330.google.com (unknown [2a00:1450:4864:20::330]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a77c98f1-6fdb-4048-93e9-834adadafd23; Thu, 02 Sep 2021 16:16:05 +0000 (UTC) Received: by mail-wm1-x330.google.com with SMTP id u26-20020a05600c441a00b002f66b2d8603so1866829wmn.4 for ; Thu, 02 Sep 2021 09:16:05 -0700 (PDT) Received: from x1w.. (163.red-83-52-55.dynamicip.rima-tde.net. [83.52.55.163]) by smtp.gmail.com with ESMTPSA id p5sm2438468wrd.25.2021.09.02.09.16.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Sep 2021 09:16:04 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list X-Inumbo-ID: a77c98f1-6fdb-4048-93e9-834adadafd23 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wV14RcZMLIQqRNfbc2l4krY7RhS99j63lxSZtHhlqHE=; b=EKqirEKnM17VK0zDlsK2zMeCBYwgcIwGau/nM2ojAXQ1rvdOXkyoVbGuyEtcnzeBcf xImFuE98afvxno05q0YdC27nz6NANS7cu771VPDYoClXWYNKBPbXOfx9/ySz5LCrUECJ Q4xIJxN/kF3No93cpZwlCIAaJ6XH09BodtAvBDBdkeBdwCBDaphPwkcvpVDIxHiZ6ysU O+OUGJNK0KyuMps/0T4ys/RLGMV8UZ8emOYDNmBvg+JTSjUog7qhAQcBWa/t3lzLUf2T odXtoH2/j2F/4nd8pGQvQwtB64/pnwk36AxB7fddw33eEJVy5u1yikEgzNZHCoqMgJ3i wCuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=wV14RcZMLIQqRNfbc2l4krY7RhS99j63lxSZtHhlqHE=; b=B1/JoJulq2t4OsAb+f+Iwcof8/8nogzJjSsSeYK+ndN9RIbLLv7MqOObXsP3zigJPC QT6sZ7X9Gsx60qQjoIvTtzUllSTGwUxnqlXdrAPEJR9qiMNt7ksMXj72JbHAvkG5mIrG nfQffqdGhX9vmV+2DCvXd+wwYeUWI+geadKt5ZYlmwm7neBWVeXD40smnHAFotR6Iu8A vLWrUsmI/dXI9HAkILlkqCDzZlfemotf4KeC7PfD2izAyKXKnCjsn9dHhtw/epHv/H4J TWk/dOeYDrnaGH9JuKv7IwQ6eyb+YrO193FQE1uX/MyyCKhGGQeKW7HEzEbpdBt+wYMA kDzw== X-Gm-Message-State: AOAM533sKL4jzmZ4JRxrrrQHFzUNx67241OAsPzhJ77CsJ9OPCSuNxaA TYZkGH9xZmE6gd74e2Htb+k= X-Google-Smtp-Source: ABdhPJw7/6UEiBwptJyfAbxmtA0JM7jALL+mTrdaJbBQ6pe56ORuZs2k15EQns1EFPDQ4opAGTbfXw== X-Received: by 2002:a05:600c:2101:: with SMTP id u1mr4147345wml.45.1630599364755; Thu, 02 Sep 2021 09:16:04 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Bin Meng , Eduardo Habkost , Greg Kurz , haxm-team@intel.com, Kamil Rytarowski , qemu-ppc@nongnu.org, Anthony Perard , Marcel Apfelbaum , Michael Rolnik , qemu-riscv@nongnu.org, Paolo Bonzini , Jiaxun Yang , Thomas Huth , David Hildenbrand , Chris Wulff , Laurent Vivier , Cameron Esfahani , Sunil Muthuswamy , Max Filippov , Taylor Simpson , qemu-s390x@nongnu.org, Richard Henderson , Bastian Koppelmann , Yoshinori Sato , Artyom Tarasenko , Aurelien Jarno , Paul Durrant , Peter Maydell , David Gibson , Alistair Francis , "Edgar E. Iglesias" , Roman Bolshakov , Laurent Vivier , Cornelia Huck , qemu-arm@nongnu.org, Wenchao Wang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , xen-devel@lists.xenproject.org, Marek Vasut , Stefano Stabellini , Aleksandar Rikalo , Mark Cave-Ayland , Colin Xu , Claudio Fontana , Palmer Dabbelt , Stafford Horne , Reinoud Zandijk , kvm@vger.kernel.org Subject: [PATCH v3 03/30] hw/core: Un-inline cpu_has_work() Date: Thu, 2 Sep 2021 18:15:16 +0200 Message-Id: <20210902161543.417092-4-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210902161543.417092-1-f4bug@amsat.org> References: <20210902161543.417092-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1630599382351100001 We want to make cpu_has_work() per-accelerator. Only declare its prototype and move its definition to softmmu/cpus.c. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/hw/core/cpu.h | 8 +------- softmmu/cpus.c | 8 ++++++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 2bd563e221f..e2dd171a13f 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -546,13 +546,7 @@ void cpu_dump_state(CPUState *cpu, FILE *f, int flags); * * Returns: %true if the CPU has work, %false otherwise. */ -static inline bool cpu_has_work(CPUState *cpu) -{ - CPUClass *cc =3D CPU_GET_CLASS(cpu); - - g_assert(cc->has_work); - return cc->has_work(cpu); -} +bool cpu_has_work(CPUState *cpu); =20 /** * cpu_get_phys_page_attrs_debug: diff --git a/softmmu/cpus.c b/softmmu/cpus.c index 071085f840b..7e2cb2c571b 100644 --- a/softmmu/cpus.c +++ b/softmmu/cpus.c @@ -251,6 +251,14 @@ void cpu_interrupt(CPUState *cpu, int mask) } } =20 +bool cpu_has_work(CPUState *cpu) +{ + CPUClass *cc =3D CPU_GET_CLASS(cpu); + + g_assert(cc->has_work); + return cc->has_work(cpu); +} + static int do_vm_stop(RunState state, bool send_stop) { int ret =3D 0; --=20 2.31.1