From patchwork Tue Dec 13 12:35:47 2022 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: 13072015 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31068C4332F for ; Tue, 13 Dec 2022 12:36:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234994AbiLMMgE (ORCPT ); Tue, 13 Dec 2022 07:36:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234740AbiLMMgC (ORCPT ); Tue, 13 Dec 2022 07:36:02 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87F6060EF for ; Tue, 13 Dec 2022 04:36:00 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id h16so6486166wrz.12 for ; Tue, 13 Dec 2022 04:36:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=jfoDaqyDi5g2SMMUF24M2o5M/2GLRFzHx+wauvWPlgQ=; b=RUnAyaXz2JFQXkf5dgXKJV9M0oDJESZyYkFT7wF9FlwaBHuPbbwscXuYCr6iatV0EW 0cjPST/WmAs7jL+Ku7Sko0l9gWGIYm355S1wXkBrPAZYT6VwWBwwUaMRf8xwcTQqlpqW U6UKWAnIIPFnBTGoinUsbrcRFZQUKyLsjiSVAM2N10/nxVCUf6B5zLf23hI8I9ncKm9R A0QiEcXFmDIxm2/7EeZ7z3jN680gJMZPvbhKcbkbPnIt3csmMUvDIKym/FV6RlanBanf yVbX17Ng5k7SkpPfXSLjuh+Y0NI+2lpL7wGIDMgFGXx8X6fd6L7Cpf+/hhgxmZFSySuc YJqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=jfoDaqyDi5g2SMMUF24M2o5M/2GLRFzHx+wauvWPlgQ=; b=kieSg9SrKqVO01x1Ql2M54Aecn5FxbD73NDOTNrqHfA8D4c+1IHocpX3tDCW1vVhgT 4ZVjLD/WyCVPETjhuQNXbY4x5miYTnPy9ao0L79QiEVnc7wflMQiEX1edKdL5n5T+FIY Q4pMfuqd/HLc00ywYxHcnSw+0YK3xiKSYXOoQXFRsHgW3i7MEo5KjF11LBo2N+ECVjix XKAI/h8Y7h8abx8SEGBbdsMj40RwTRV5UTK1/Qui25bnDE93S85NN42s81XcYpWPkg1b yDzOUD6f2c3JZmKSAXpLcfz4pueDJ4aBsBzgleDitcOIFvCvdtQDXpe0YQ4AFyELuzP/ wz4g== X-Gm-Message-State: ANoB5pnmO37qPmmCZl8QrUARdptt2zZaBR04eI76NARCt/I4pqm3e/I9 4AnV+dztyypzjb+ZrguQmSieAg== X-Google-Smtp-Source: AA0mqf52yKem59QUTfrTjSFYRE9vr+JRXVc9MtIQxCiGer8yhcYzjgGgqwCKdD/1loTBA7u52JhqOQ== X-Received: by 2002:a5d:6045:0:b0:242:24a7:c7f2 with SMTP id j5-20020a5d6045000000b0024224a7c7f2mr11925721wrt.58.1670934959132; Tue, 13 Dec 2022 04:35:59 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id e3-20020a5d5303000000b002366dd0e030sm11671653wrv.68.2022.12.13.04.35.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 13 Dec 2022 04:35:58 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-ppc@nongnu.org, David Gibson , kvm@vger.kernel.org, Alexey Kardashevskiy , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Greg Kurz , Paolo Bonzini , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-8.0 1/4] target/ppc/kvm: Add missing "cpu.h" and "exec/hwaddr.h" Date: Tue, 13 Dec 2022 13:35:47 +0100 Message-Id: <20221213123550.39302-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221213123550.39302-1-philmd@linaro.org> References: <20221213123550.39302-1-philmd@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org kvm_ppc.h is missing various declarations from "cpu.h": target/ppc/kvm_ppc.h:128:40: error: unknown type name 'CPUPPCState'; did you mean 'CPUState'? static inline int kvmppc_get_hypercall(CPUPPCState *env, ^~~~~~~~~~~ CPUState include/qemu/typedefs.h:45:25: note: 'CPUState' declared here typedef struct CPUState CPUState; ^ target/ppc/kvm_ppc.h:134:40: error: unknown type name 'PowerPCCPU' static inline int kvmppc_set_interrupt(PowerPCCPU *cpu, int irq, int level) ^ target/ppc/kvm_ppc.h:285:38: error: unknown type name 'hwaddr' hwaddr ptex, int n) ^ target/ppc/kvm_ppc.h:220:15: error: unknown type name 'target_ulong' static inline target_ulong kvmppc_configure_v3_mmu(PowerPCCPU *cpu, ^ target/ppc/kvm_ppc.h:286:38: error: unknown type name 'ppc_hash_pte64_t' static inline void kvmppc_read_hptes(ppc_hash_pte64_t *hptes, ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza --- target/ppc/kvm_ppc.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h index ee9325bf9a..5fd9753953 100644 --- a/target/ppc/kvm_ppc.h +++ b/target/ppc/kvm_ppc.h @@ -9,6 +9,9 @@ #ifndef KVM_PPC_H #define KVM_PPC_H +#include "exec/hwaddr.h" +#include "cpu.h" + #define TYPE_HOST_POWERPC_CPU POWERPC_CPU_TYPE_NAME("host") #ifdef CONFIG_KVM From patchwork Tue Dec 13 12:35:48 2022 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: 13072016 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8525C4332F for ; Tue, 13 Dec 2022 12:36:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235255AbiLMMgM (ORCPT ); Tue, 13 Dec 2022 07:36:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234740AbiLMMgH (ORCPT ); Tue, 13 Dec 2022 07:36:07 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 916CB164BD for ; Tue, 13 Dec 2022 04:36:06 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id o5-20020a05600c510500b003d21f02fbaaso951601wms.4 for ; Tue, 13 Dec 2022 04:36:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=kaPjbKdMr76WDvODBflVFVeFIfBaQyO5rZm5rUBpNuw=; b=O2ot/k263FnLwr6J9y4vgJFRt8gHLPGH+hYoc+NkfvsmnefXlPnGZlKV8VaoDFYsl2 tn4cJPrjWf4augfmgq/yh0o+PlrKquNKGxM+vgRAO/pBZE4l5MZ84gzT313lx8kTdwHV K6FxQulbeRmrkFTTBqGMFUcyGs7iCYU5rNySfLLa/9pwV0TyJUgHwk7niUza6Riz0S4E exNt9PaeK9U176+7vydCwwzvZPiJ41xLFN5PRFEM6K/4lqmnr+M/uc8DzjHVI5S0MNyE fNme6kL5jj1uCRkbMgT1tQ1KaxfYfrrr6h9aQJTHxFSoxa8k6RLI2cKkO5Sr1fugKJtF 8g0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=kaPjbKdMr76WDvODBflVFVeFIfBaQyO5rZm5rUBpNuw=; b=erovyGyeBo3at2zf1626IvU70BiNht1hBLgF8z0RLZho1o+bvndC0mVwa8JKFcQnYp /8rw9r4lI7zy+r/oRI5/cvPgl7Fy+EgsEg9BHSeHhwN6OaeH0iS9DGEbWgEeNr1d+0iX lL2esXwNpcru5bVvrpEIq63cjqTs42FdMgLaxvivWB/j+p5ZeuIyPN+hhy54FQUuYgof v7zuB92rYNYzLE0FxPsnF/b/7cIu3MA4ehzA6YewG1ekPJBbmGp6jNXgvmLtjbElTHb2 ClV2mJcfge1SnvUOmsAylC3fgZA6p027yVM3BhXTTYdWvCu1RBidjAcoc9fDoIKkHCar eiUg== X-Gm-Message-State: ANoB5pli/dvuvDnLniMP20Tph6OrXgG10O5S++aeoykGR2fjndXi44Wz ZZ0NnLOTBeTnhlC56ptXuLOLBg== X-Google-Smtp-Source: AA0mqf6vaK+43TBHB5IP98FncgtiD9SnBheWSw4weMDQLfnluEzaSymwtarl0qzMsoQxR8wgtmqdTQ== X-Received: by 2002:a05:600c:4e46:b0:3d1:c8c8:fc0 with SMTP id e6-20020a05600c4e4600b003d1c8c80fc0mr15296436wmq.10.1670934964621; Tue, 13 Dec 2022 04:36:04 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id o3-20020a05600c4fc300b003cfbbd54178sm3375484wmq.2.2022.12.13.04.36.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 13 Dec 2022 04:36:04 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-ppc@nongnu.org, David Gibson , kvm@vger.kernel.org, Alexey Kardashevskiy , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Greg Kurz , Paolo Bonzini , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-8.0 2/4] hw/ppc/vof: Do not include the full "cpu.h" Date: Tue, 13 Dec 2022 13:35:48 +0100 Message-Id: <20221213123550.39302-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221213123550.39302-1-philmd@linaro.org> References: <20221213123550.39302-1-philmd@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org "vof.h" doesn't need the full "cpu.h" to get the target_ulong definition, including "exec/cpu-defs.h" is enough. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza --- include/hw/ppc/vof.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/ppc/vof.h b/include/hw/ppc/vof.h index f8c0effcaf..d3f293da8b 100644 --- a/include/hw/ppc/vof.h +++ b/include/hw/ppc/vof.h @@ -9,7 +9,7 @@ #include "qom/object.h" #include "exec/address-spaces.h" #include "exec/memory.h" -#include "cpu.h" +#include "exec/cpu-defs.h" typedef struct Vof { uint64_t top_addr; /* copied from rma_size */ From patchwork Tue Dec 13 12:35:49 2022 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: 13072017 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 170DAC4332F for ; Tue, 13 Dec 2022 12:36:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235276AbiLMMgS (ORCPT ); Tue, 13 Dec 2022 07:36:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235319AbiLMMgO (ORCPT ); Tue, 13 Dec 2022 07:36:14 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E18513E9B for ; Tue, 13 Dec 2022 04:36:11 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id ja4-20020a05600c556400b003cf6e77f89cso1075596wmb.0 for ; Tue, 13 Dec 2022 04:36:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=GAS00uDwTnX0iz6OiEnof4qv+85R5FD/5UPI6Ha2V80=; b=lQmDA90DbXEwC7qP5vPds/7EEfMXj/0zvOwqP7kxXmDGx6j9d3G5fJXLl9eVN3Voby 7N9XLDnv8YW2mE0ZUfC80tjWsajTp1tMWPNqsm2bfIm9lKyRnWmA9PHbpELvM/WJ0nDD SaDduq0n3B5HUjsRgR+3CyFagqZYjN05fZ5T7VPL7tdRQ0BujZ6hJYF/EoyT+nzBd/sy H55ydNcpEOcoDROHV+kPvDP0fguBIb9JZKbAMePgLuxyHHQuK25RhVlJ192zx2oE/P23 mTVu+xEKOhWXgNY5Y4wcrdeL1R+mTMHhV2Oau8MdxRaN78GpBLJIMu4DiIOMQgHi84Py +R+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=GAS00uDwTnX0iz6OiEnof4qv+85R5FD/5UPI6Ha2V80=; b=tTuVCT6pCk7GOY937o822tey7TWtLFR8RrZgsew/6cVOMeJDGztuyyDxFYoOMn6eLF UpdbVOEb5AkM27crXF7Z00qnMwAKcKA1sBLo4cky+PFlW3bnGuhLNfu8iXvwfdYTsO8p kVR2v7ZL/DcOZwXc7/FhbwE9x25Ffl3ZySs05SCCOJe4SWEWK5aXO3H+D6t5GgS+ZDfK IIFiwgI7rUv8QAKfHUSdDy/4u3ubN5NqP2zxhHcxkpHmekKe3nb3nSZnfBkgUMK9ztEG dhiHsctlYJs5dhNIGOBID0Na7OaQBD6wTVgg+fd8zsj1YUdoBT2hsgwzQueKq5LBc0Qc 693Q== X-Gm-Message-State: ANoB5pnaKqA7HJ6TCnXqEbBeyIxzB/DmPB3hvFWLrLfAM7lOIzys37Dn Zi+7d229FALTP0yeh+0SNg048aOhtG6JGKNJ3Mk= X-Google-Smtp-Source: AA0mqf6Q7a99lz4o6i2mZR6Xev5Bo/BCPIkxBFwblJpymEZdQWi+7bcEYuWQEdQoM9waol9RshSezg== X-Received: by 2002:a05:600c:22ca:b0:3d1:ee97:980 with SMTP id 10-20020a05600c22ca00b003d1ee970980mr19035459wmg.7.1670934970165; Tue, 13 Dec 2022 04:36:10 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id q13-20020a7bce8d000000b003cf71b1f66csm12090266wmj.0.2022.12.13.04.36.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 13 Dec 2022 04:36:09 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-ppc@nongnu.org, David Gibson , kvm@vger.kernel.org, Alexey Kardashevskiy , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Greg Kurz , Paolo Bonzini , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-8.0 3/4] hw/ppc/spapr: Reduce "vof.h" inclusion Date: Tue, 13 Dec 2022 13:35:49 +0100 Message-Id: <20221213123550.39302-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221213123550.39302-1-philmd@linaro.org> References: <20221213123550.39302-1-philmd@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Currently objects including "hw/ppc/spapr.h" are forced to be target specific due to the inclusion of "vof.h" in "spapr.h". "spapr.h" only uses a Vof pointer, so doesn't require the structure declaration. The only place where Vof structure is accessed is in spapr.c, so include "vof.h" there, and forward declare the structure in "spapr.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 1 + include/hw/ppc/spapr.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 66b414d2e9..f38a851ee3 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -62,6 +62,7 @@ #include "hw/ppc/fdt.h" #include "hw/ppc/spapr.h" #include "hw/ppc/spapr_vio.h" +#include "hw/ppc/vof.h" #include "hw/qdev-properties.h" #include "hw/pci-host/spapr.h" #include "hw/pci/msi.h" diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 04a95669ab..5c8aabd444 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -12,7 +12,6 @@ #include "hw/ppc/spapr_xive.h" /* For SpaprXive */ #include "hw/ppc/xics.h" /* For ICSState */ #include "hw/ppc/spapr_tpm_proxy.h" -#include "hw/ppc/vof.h" struct SpaprVioBus; struct SpaprPhbState; @@ -22,6 +21,8 @@ typedef struct SpaprEventLogEntry SpaprEventLogEntry; typedef struct SpaprEventSource SpaprEventSource; typedef struct SpaprPendingHpt SpaprPendingHpt; +typedef struct Vof Vof; + #define HPTE64_V_HPTE_DIRTY 0x0000000000000040ULL #define SPAPR_ENTRY_POINT 0x100 From patchwork Tue Dec 13 12:35:50 2022 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: 13072018 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55BB7C10F1D for ; Tue, 13 Dec 2022 12:36:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234999AbiLMMgV (ORCPT ); Tue, 13 Dec 2022 07:36:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234798AbiLMMgS (ORCPT ); Tue, 13 Dec 2022 07:36:18 -0500 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C028D164BD for ; Tue, 13 Dec 2022 04:36:16 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id bg10so8194103wmb.1 for ; Tue, 13 Dec 2022 04:36:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=EIWqF960/rg6gqFejdnkrSGn2PEdfww2KszocKY9NPM=; b=h+gcwRarxYHjDQt6eSyU6mMb0ymg/ujMpr/wyp/9NOXKwuVevsa2yuezcU38aA6uR6 EgIrEBN6stZqv94xqIx1RCw3f2THn/jyeyfS3pp8+5l4OVRciFQf4RGrOJcsrgOZrb+W /UgIenJ71XQQYqRl07SuUEGXJFw3kRU5W4AP6MNJlgUVyH+IQBn8P/gBnYW/8PyXFjjT 7qrpQPkacbCf7KNPFamMzHqj6FSCnjenY/SZwxTNqpgykDjL3eS5PQBeFY2AATyiFpcm UA4WpWOcvjMpG62XkYMzgJriRHmuK97wk4cyMPnuYWKn2rrBYZ8fHqx1FNQ77WpX9igD myZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=EIWqF960/rg6gqFejdnkrSGn2PEdfww2KszocKY9NPM=; b=DTenl8J9ljL+vYg33frRL17PPMKD+Ewq6GgpASS6tBG+h9Mw2AB1Uhz6WpxwmkaOx1 XpcPVrxC/Q1GFuTogq36Qdiq/5c9HkiaALP+PrR5V+1OKMVvPz4Beu4M9wKt2SJGXNci 487JxSEDrYWc1nV1vvMuHfgiFe0nU6l52/GBEGZbrtrFHxGSWncOoXQ3Uyn40Rrv5PZU o/pvC4OVRid3lOQ/Z8XuMZUk0T/C7m7R3mP5z6SlQkb2CvStNJYeI5fzTGhB6oBYCWhW d0ZRZALFhveJo5lZGkOJoitOZTtMYyqotRPxBNuPhHiGFBez3oYFRr5n0l0fv6UQZSHR fKhQ== X-Gm-Message-State: ANoB5pnVwjrvXadFFGZ+LS9ifs5Gzj537VFnZ6v8FQ3Q+1HV1SZ1914V baHOtauhfWoMLfhah/YWsXwTIg== X-Google-Smtp-Source: AA0mqf7dkCjTxnH6apRlWOJdUMUEZAV5hp9evrnE4rLoQ6DaTgUx1600ij+Ta4YGbtEpSlYE+HcuzA== X-Received: by 2002:a05:600c:1c06:b0:3cf:71f9:3b4c with SMTP id j6-20020a05600c1c0600b003cf71f93b4cmr14756046wms.23.1670934975281; Tue, 13 Dec 2022 04:36:15 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id j17-20020a05600c1c1100b003cfd42821dasm14467122wms.3.2022.12.13.04.36.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 13 Dec 2022 04:36:14 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-ppc@nongnu.org, David Gibson , kvm@vger.kernel.org, Alexey Kardashevskiy , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Greg Kurz , Paolo Bonzini , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-8.0 4/4] hw/ppc/spapr_ovec: Avoid target_ulong spapr_ovec_parse_vector() Date: Tue, 13 Dec 2022 13:35:50 +0100 Message-Id: <20221213123550.39302-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221213123550.39302-1-philmd@linaro.org> References: <20221213123550.39302-1-philmd@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org spapr_ovec.c is a device, but it uses target_ulong which is target specific. The hwaddr type (declared in "exec/hwaddr.h") better fits hardware addresses. Change spapr_ovec_parse_vector() to take a hwaddr argument, allowing the removal of "cpu.h" in a device header. Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/spapr_ovec.c | 3 ++- include/hw/ppc/spapr_ovec.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/ppc/spapr_ovec.c b/hw/ppc/spapr_ovec.c index b2567caa5c..a18a751b57 100644 --- a/hw/ppc/spapr_ovec.c +++ b/hw/ppc/spapr_ovec.c @@ -19,6 +19,7 @@ #include "qemu/error-report.h" #include "trace.h" #include +#include "cpu.h" #define OV_MAXBYTES 256 /* not including length byte */ #define OV_MAXBITS (OV_MAXBYTES * BITS_PER_BYTE) @@ -176,7 +177,7 @@ static target_ulong vector_addr(target_ulong table_addr, int vector) return table_addr; } -SpaprOptionVector *spapr_ovec_parse_vector(target_ulong table_addr, int vector) +SpaprOptionVector *spapr_ovec_parse_vector(hwaddr table_addr, int vector) { SpaprOptionVector *ov; target_ulong addr; diff --git a/include/hw/ppc/spapr_ovec.h b/include/hw/ppc/spapr_ovec.h index c3e8b98e7e..d756b916e4 100644 --- a/include/hw/ppc/spapr_ovec.h +++ b/include/hw/ppc/spapr_ovec.h @@ -37,7 +37,7 @@ #ifndef SPAPR_OVEC_H #define SPAPR_OVEC_H -#include "cpu.h" +#include "exec/hwaddr.h" typedef struct SpaprOptionVector SpaprOptionVector; @@ -73,7 +73,7 @@ void spapr_ovec_set(SpaprOptionVector *ov, long bitnr); void spapr_ovec_clear(SpaprOptionVector *ov, long bitnr); bool spapr_ovec_test(SpaprOptionVector *ov, long bitnr); bool spapr_ovec_empty(SpaprOptionVector *ov); -SpaprOptionVector *spapr_ovec_parse_vector(target_ulong table_addr, int vector); +SpaprOptionVector *spapr_ovec_parse_vector(hwaddr table_addr, int vector); int spapr_dt_ovec(void *fdt, int fdt_offset, SpaprOptionVector *ov, const char *name);