From patchwork Tue Jun 27 11:51:19 2023 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: 696836 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp3724632wrm; Tue, 27 Jun 2023 04:52:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4sfLlnxyxH0APN79LgibrX34vAulR19Urp8Fww3Mq4vUscBv9tf5KZp3+PXX1B7WZg6hUW X-Received: by 2002:a05:620a:2906:b0:765:ad35:1eaa with SMTP id m6-20020a05620a290600b00765ad351eaamr5424776qkp.59.1687866773506; Tue, 27 Jun 2023 04:52:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687866773; cv=none; d=google.com; s=arc-20160816; b=mghmbWgaWOkaNG5pioRW3ApydhIXqZTWT2GuarYVVaTZnhW7vo/nloGXZXeegPk0MQ jPApo1rsgExPD9OxASBHMmTxVLQ1ea4PrzBLr3Ypa283wG+lKzGPqQTAPZwQdgpOYw1f OBREQ6Z/n+dxs6z+ttI2u45VhNRUki2ISPK+Oex3LIvOXqGplgwxI4uQlZH9o/SpnEoZ rj6nvqlq405N6oqMxmvW1Xz9/l3DTdOFaJuc4TMtH94cI4eXY/9oiR2REWC4/cgKjjgC dKHEb27zvsB4jfmGAmfDv3wVW4aSpxYssEef4nN+LCWC5sQCKGIsTjByF9AKffr/pbBO DZ5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=vqGKfDWguJ/wQ1MgcOKBra/Rp1I0sbXrog+W6VzRYIk=; fh=HTfWIrJzOLTRsca7VdqVkZSV2mA14Yhlo/G1nQOSMq0=; b=IAxtQIl7+e6UeUFefju6pQyx9P/cZO3+pQaEvx1A5syPTPv3xYvYAW8qdacHpS92th C0kHGMPjpt6GYOjTAHbMRWYd1MhT2CVdc+ke18/rLFLdja0aZbA6axhv2iu5ZOw46xCr AAaMNE+0YTKGcV2CojTnpH6jePV6HFofGD6chqpnUlwEyhZQtg6qW+sGfincv6+SIKdF 61ipD2cU0BJBMwtm7oIpN7/8sr9uxRL7WiZIY15azx3n0n9PsQuJdlJNMdpOr0ioi8aA xENBye/7AqWgWUCghJRiyX4+Dz4Ih9HI8V3ln/FEJyO8k89/bw4xTqXQT9GSR68Xg6Tx fniA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ewP/4+l1"; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j12-20020ac85f8c000000b003f1f5e02726si2883423qta.198.2023.06.27.04.52.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Jun 2023 04:52:53 -0700 (PDT) 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="ewP/4+l1"; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qE7ER-0001nW-Os; Tue, 27 Jun 2023 07:51:39 -0400 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 1qE7EQ-0001j1-2e for qemu-devel@nongnu.org; Tue, 27 Jun 2023 07:51:38 -0400 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qE7EN-0004iU-MR for qemu-devel@nongnu.org; Tue, 27 Jun 2023 07:51:37 -0400 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2b6afc1ceffso9558251fa.0 for ; Tue, 27 Jun 2023 04:51:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687866693; x=1690458693; 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=vqGKfDWguJ/wQ1MgcOKBra/Rp1I0sbXrog+W6VzRYIk=; b=ewP/4+l1QLLin+KK4AdIpG6bDe13BPYlhXal/v/3ycYZcBW61sbUWbK85IvzFqoKWq taSeDcJpBYtghpfLdfEoAXcv+EI3epbC/jcMtzm19+bZ5TGMitS4MrDYVCY4T+SQvvwg krtsS2xOqMCc5FagWxKD2GAFDfSG5WSMWZtZkhtkWbNKSSh0qNt1XHRFiskR3ixRupXW 5D6SGbX/c+qD+5Ied4g3hsI0hqfWWsq4XyMgPeJQQW8nLSwbUS5PpZ799Gvymqq25yQR G2/Jeqkuk4ZJ0l3k+RcQCJjYqxjZp7QZZ2jnu3EKwZlfPMjivKmZrvBy2uemvS9Tz+L0 aM1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687866693; x=1690458693; 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=vqGKfDWguJ/wQ1MgcOKBra/Rp1I0sbXrog+W6VzRYIk=; b=HtHuSM4AhNLo1MqScVxFQqMTaF/agjcnURhFi2Dv1J6VPVOcqKB/noE/JmcHsvFhxm tO9EqSlLX+5PJuyffv/4ux165eOn09SR6z/qrHqJhMk8K7FcDY0aSDqZAQF4DD9Xs/9q vkRp7ybw70sAoIu+EOy+AOzngdy9cdiachpAv0N71mbbQi+837JGbyyD/Bcp9KlcLQ0r 5zZ5UrLsYhw6iNFGRN+Tb6xDHVoxcdV/31xLA2QyORpD272tufYVtgM7yOaMgy6fPuRt vq/WeM+e62wJABTOf3lvGP8McRJH1OcwhU74StVG8Rv72/p985a+7J5WV4GFgEgNLMRI kc5w== X-Gm-Message-State: AC+VfDxqAa1Li978eVlhLCXFF09x4tdyj1nRk72oHiaHcUJSRBdZFsEB /49mar/iBXtpUFe8PKuVRk2niQPdZ6IAyev6ESQ= X-Received: by 2002:a2e:2408:0:b0:2b5:89db:187 with SMTP id k8-20020a2e2408000000b002b589db0187mr12374664ljk.42.1687866693587; Tue, 27 Jun 2023 04:51:33 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.204]) by smtp.gmail.com with ESMTPSA id v20-20020aa7dbd4000000b00514a5f7a145sm3701188edt.37.2023.06.27.04.51.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 27 Jun 2023 04:51:33 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: David Gibson , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , qemu-ppc@nongnu.org, Paolo Bonzini , Greg Kurz , kvm@vger.kernel.org, Nicholas Piggin , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 1/6] target/ppc: Have 'kvm_ppc.h' include 'sysemu/kvm.h' Date: Tue, 27 Jun 2023 13:51:19 +0200 Message-Id: <20230627115124.19632-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230627115124.19632-1-philmd@linaro.org> References: <20230627115124.19632-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22d; envelope-from=philmd@linaro.org; helo=mail-lj1-x22d.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 "kvm_ppc.h" declares: int kvm_handle_nmi(PowerPCCPU *cpu, struct kvm_run *run); 'struct kvm_run' is declared in "sysemu/kvm.h", include it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Greg Kurz Reviewed-by: Cédric Le Goater --- target/ppc/kvm_ppc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h index 611debc3ce..2e395416f0 100644 --- a/target/ppc/kvm_ppc.h +++ b/target/ppc/kvm_ppc.h @@ -9,6 +9,7 @@ #ifndef KVM_PPC_H #define KVM_PPC_H +#include "sysemu/kvm.h" #include "exec/hwaddr.h" #include "cpu.h" From patchwork Tue Jun 27 11:51:20 2023 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: 696833 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp3724629wrm; Tue, 27 Jun 2023 04:52:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5J6hlnhk4IWmZcrYJQdywl6p3k5MVmXiifP/GIAHm0z4GHI8yGEaC0eh7ew0ohLlcN52aZ X-Received: by 2002:a05:6214:ac9:b0:635:5a95:bb48 with SMTP id g9-20020a0562140ac900b006355a95bb48mr10114480qvi.24.1687866773411; Tue, 27 Jun 2023 04:52:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687866773; cv=none; d=google.com; s=arc-20160816; b=q2wN9rjbpvdM3xeDsphFXLRsaIp270MZjHl0NQx4ODORfrce6/VDrKESQR58fUSZ2J kzyPk450wVSTKELvfekyB/GhUYWppYSioiiHWLLm1bPWZoRqEmaEZBpmeI8Hk48YLnX/ UbGoJ1YTA3dzyTvtZAw3rAPiK9pGKxxNCZaZDhn14bKTd/q6kh4cSAg7Bt2aANRLhAoA lmUmBGuyZ2rMsyccRwrvicD+6X5mkfPTgSLF4D/pKxJrc9mpoQJGRy7ecMnGHt/u1Iym k2VEaaaWyk+378/QqkRIIbVxPBVGy/UFVTU3P3ug2gTUHN0oC5ra4izIh8RvMksaBWjD Es+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=5EM+qSWWOslftV8HcBXpILD27b+3+W5mkalItnU32xI=; fh=HTfWIrJzOLTRsca7VdqVkZSV2mA14Yhlo/G1nQOSMq0=; b=p2UhCgAllogHir9wrSGc7stkiya8KSqJ0SFTOAotUSvoJjB93fRB/PqysyS9gQwnw7 njsmRhoiQ4lH0o8xSlgVm+AapauWh5ilU4Nuizn3lkhLDt6tGeiwGa7SJdYQlu190msr c9Jjw1UA5CaeoXqQjW+KG6dJkV8iHptPOE9RZKQjTDUCvSRBRz0cW+OcJH8gS4PMdaXU QPNVlqC8bUZ0y2P8MOQXRWRmYvzhFgHpTsAgwK6kjk+Z1Fmb1Vp+p9SuDLoADyB7kEqw UCG0fciPrK5teC9W1RwFsXn9r7kBJyajW6ZRH2NYmp1O63f7IyPb1sxj6zBbexaHCU1O e+Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="zK/wO1TE"; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t17-20020a05620a0b1100b00765c0f88066si1491774qkg.94.2023.06.27.04.52.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Jun 2023 04:52:53 -0700 (PDT) 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="zK/wO1TE"; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qE7Eb-0001uE-MV; Tue, 27 Jun 2023 07:51:49 -0400 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 1qE7EW-0001s8-HZ for qemu-devel@nongnu.org; Tue, 27 Jun 2023 07:51:45 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qE7ET-0004jc-Eu for qemu-devel@nongnu.org; Tue, 27 Jun 2023 07:51:42 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-991fe70f21bso133754666b.3 for ; Tue, 27 Jun 2023 04:51:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687866699; x=1690458699; 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=5EM+qSWWOslftV8HcBXpILD27b+3+W5mkalItnU32xI=; b=zK/wO1TEMHYu1s8XH1PAIG4ggr3gqj0hxpHfpqqesgDccWWASPBRBwTqjxvaLS7OM/ RhMBJrthSW8x7Vdiz/3rk8ib0FJBohtxOdjRkOHHxTNXzMH+9mJodaN5iBmJDghhQe6C aVf9y97NdoZtReSmqCSzF/SPOBoo2Rjd66wYrVJqBLCSDW5Y7Tb/1uD2lswOQV6Uqs7r jnrJYC9q6Z3xfVRXCLZ6b7P1d9qfr1IAeVNRqpWnYkEGqA9L6MTYjxDAlFpbQ2oSEOZ6 On/49dj0L5K/TeWwyPNO6VoamET9qq1TBnwFBHI8G5Y7JBnd3tCu6O2RlijPXj4RAXqe gaEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687866699; x=1690458699; 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=5EM+qSWWOslftV8HcBXpILD27b+3+W5mkalItnU32xI=; b=I8FpUhTDNUHhwnll75rqgNtsaesvmkZ0WZn9E1M233YsxfdmKbfAtbjsOjUoJC6G/B Yatv74/BAFRg2XByClKQ/MHM1pRwPvIQkLdm1avY/6HN/SOOUR4Axh4umKfVKUIu+XEr rV0BWZ5S3wehOLgEzz4x6OnfQjN0jJysfOqEoEBJjGOAdcU3G7TaQc/Po5QXhY64jJpi aIk9/U6OBoctOCi4RS0vjYTgErpzqNcwwCSKsSnJruJNgSr0n0zEkXLNUh1ftZYJ7/fO mhOLgUfv11SIfhmqL8u0n6bpeJIFaqPu0woBFOBm9lDcSsWmFRvaH4MDFrcJIfQhvqXs vziQ== X-Gm-Message-State: AC+VfDxq1NPdj2FmNARCxJSYBzVrmiWAwN50kDjdm4rqiho8aZgqh17d eJEbiH6+SGNluLTh5tfvtKloIlSlDfHUgd4Uaqs= X-Received: by 2002:a17:906:684c:b0:98e:4c96:6e18 with SMTP id a12-20020a170906684c00b0098e4c966e18mr4150187ejs.5.1687866699521; Tue, 27 Jun 2023 04:51:39 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.204]) by smtp.gmail.com with ESMTPSA id ce23-20020a170906b25700b009920f18a5f0sm791874ejb.185.2023.06.27.04.51.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 27 Jun 2023 04:51:39 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: David Gibson , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , qemu-ppc@nongnu.org, Paolo Bonzini , Greg Kurz , kvm@vger.kernel.org, Nicholas Piggin , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 2/6] target/ppc: Reorder #ifdef'ry in kvm_ppc.h Date: Tue, 27 Jun 2023 13:51:20 +0200 Message-Id: <20230627115124.19632-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230627115124.19632-1-philmd@linaro.org> References: <20230627115124.19632-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=philmd@linaro.org; helo=mail-ej1-x629.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 Keep a single if/else/endif block checking CONFIG_KVM. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater --- target/ppc/kvm_ppc.h | 62 ++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 34 deletions(-) diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h index 2e395416f0..49954a300b 100644 --- a/target/ppc/kvm_ppc.h +++ b/target/ppc/kvm_ppc.h @@ -93,7 +93,34 @@ void kvmppc_set_reg_tb_offset(PowerPCCPU *cpu, int64_t tb_offset); int kvm_handle_nmi(PowerPCCPU *cpu, struct kvm_run *run); -#else +#define kvmppc_eieio() \ + do { \ + if (kvm_enabled()) { \ + asm volatile("eieio" : : : "memory"); \ + } \ + } while (0) + +/* Store data cache blocks back to memory */ +static inline void kvmppc_dcbst_range(PowerPCCPU *cpu, uint8_t *addr, int len) +{ + uint8_t *p; + + for (p = addr; p < addr + len; p += cpu->env.dcache_line_size) { + asm volatile("dcbst 0,%0" : : "r"(p) : "memory"); + } +} + +/* Invalidate instruction cache blocks */ +static inline void kvmppc_icbi_range(PowerPCCPU *cpu, uint8_t *addr, int len) +{ + uint8_t *p; + + for (p = addr; p < addr + len; p += cpu->env.icache_line_size) { + asm volatile("icbi 0,%0" : : "r"(p)); + } +} + +#else /* !CONFIG_KVM */ static inline uint32_t kvmppc_get_tbfreq(void) { @@ -440,10 +467,6 @@ static inline bool kvmppc_pvr_workaround_required(PowerPCCPU *cpu) return false; } -#endif - -#ifndef CONFIG_KVM - #define kvmppc_eieio() do { } while (0) static inline void kvmppc_dcbst_range(PowerPCCPU *cpu, uint8_t *addr, int len) @@ -454,35 +477,6 @@ static inline void kvmppc_icbi_range(PowerPCCPU *cpu, uint8_t *addr, int len) { } -#else /* CONFIG_KVM */ - -#define kvmppc_eieio() \ - do { \ - if (kvm_enabled()) { \ - asm volatile("eieio" : : : "memory"); \ - } \ - } while (0) - -/* Store data cache blocks back to memory */ -static inline void kvmppc_dcbst_range(PowerPCCPU *cpu, uint8_t *addr, int len) -{ - uint8_t *p; - - for (p = addr; p < addr + len; p += cpu->env.dcache_line_size) { - asm volatile("dcbst 0,%0" : : "r"(p) : "memory"); - } -} - -/* Invalidate instruction cache blocks */ -static inline void kvmppc_icbi_range(PowerPCCPU *cpu, uint8_t *addr, int len) -{ - uint8_t *p; - - for (p = addr; p < addr + len; p += cpu->env.icache_line_size) { - asm volatile("icbi 0,%0" : : "r"(p)); - } -} - #endif /* CONFIG_KVM */ #endif /* KVM_PPC_H */ From patchwork Tue Jun 27 11:51:21 2023 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: 696839 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp3724777wrm; Tue, 27 Jun 2023 04:53:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7EJ1KHaRk7OfQm9DAJuTRUa8R8N7HzFDrtcdtOibr5x1eaV6g0hWObN0FDvL9/A0D0b7TZ X-Received: by 2002:a05:620a:2409:b0:765:5ba6:a5c0 with SMTP id d9-20020a05620a240900b007655ba6a5c0mr7710900qkn.14.1687866797067; Tue, 27 Jun 2023 04:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687866797; cv=none; d=google.com; s=arc-20160816; b=l58ju6WaUp4Neu+g9mp6wBAvd8MbPYZb2NZQwHdnxD2fz2nbNGvyNUnLNVm5OhOudw hSrcB/syHawFbnTGaKXMNEmTgZ0MK0IjziiGNip/W6cTlX0ZneL0Valz5wBInnHIdtxr RCN0liGgN36LjYdQ9gLnGwZAf8Vp8KEVU8seXpqAKckyVwThlfOQl/cCl3OeH7MM2iIO PLaTYhqYqZFz7b4/nsMdVo4qmIOuZlHesPhZrEL9tl79/iFW7rlOG/Ctyr9bu80FypsP SbxneGKcC5LIOsA+Uo/WAon3/Nwuh8k3vFVr0/nAXFrNQeNlYJSdDRMXDaqQqWb0QXN8 tX9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=wwRqncGBMw48ZRHZQQygcwpEXInzVqgYCZMTOEm7gro=; fh=HTfWIrJzOLTRsca7VdqVkZSV2mA14Yhlo/G1nQOSMq0=; b=PQkV+vPCPvgRPj+JAvCQ44dNUsExJbOpAPpGFmo3oNQnOhpDR8unGqJ5bGuzR2hcMo j81Q2SJOKLPO+417//GiCyBZm6Rjz4FBv4Y7Pp3p0FDkien/VOvXnc2fpC0+dTnY+teQ tYMmRmRnPA3VcT3u1eP1L2mEI6ZeNTze1SMOhoVrbVNRqpTvLUnC0KKG196fGW8SaZR7 JY3WhkfW0I1IJIR5FXone0+GnGBILt9RTorUNLKHbXs4fpC0oFHxncGazfOmg4u+IJuv kU4uM8qwLVn/SdNJKf0ZnUiC/V+27SX4qyKzv3mfKs6YcQ+91MEz9VBqJrU8IKNegre3 goLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mnixBROM; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l14-20020a05620a28ce00b0076098a19221si375217qkp.356.2023.06.27.04.53.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Jun 2023 04:53:17 -0700 (PDT) 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=mnixBROM; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qE7Ef-0001up-4p; Tue, 27 Jun 2023 07:51:53 -0400 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 1qE7Ea-0001tw-Mz for qemu-devel@nongnu.org; Tue, 27 Jun 2023 07:51:48 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qE7EZ-0004kQ-66 for qemu-devel@nongnu.org; Tue, 27 Jun 2023 07:51:48 -0400 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-986d8332f50so561017766b.0 for ; Tue, 27 Jun 2023 04:51:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687866705; x=1690458705; 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=wwRqncGBMw48ZRHZQQygcwpEXInzVqgYCZMTOEm7gro=; b=mnixBROMk4W/E5oZOyhcDKzrHtFUiMXo/SHSOVZCdjVa4W+QHAk1YP6JN0WdriXCRg 7kgoxdRSdpXiXm9/tuZtgVuUAVG4ULDZsoY7BNnEAtsId8Zrgl3kiwhYh8lszegl3BbK eboQUwrTSJ19pIAC5BvplUdAQ5sUlzxk+8+17nFe/f8c02iQ5HztThoAHTWuKxBxryTN vQz3qYE32MLVfAyKfOuC1Jf5fuf2ID3FOaFQZuzkK/hinGVcshX/IMsG6Y03ITu8CKRp tLJv9jBxZg9m/AMaSr9x1W1DFD3qMA1U+SUcDCepP90EDHA7/670RNlWEjyMxhvaXW6J bCDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687866705; x=1690458705; 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=wwRqncGBMw48ZRHZQQygcwpEXInzVqgYCZMTOEm7gro=; b=CT1Z6ZdiqxVsY8ax7EfjPMPXKb2lDH31ImAroP7FI2yM6UbBm4gMl8/h3+pHZVXc1Y hnv+SPhdFXY3N2CqsTmuddBhdsYYFoeBu+thBkFePcOGagUEWVGUj6N51hCHfoEiZUAx 9uu9DMtdYKUGUInsG4HEknHD6OM/kaZpkcfJeBuW6C0N8qTFGNQv2FnFOdKwcDdYvpgQ 8iJ4pMzokj7gHgxyg/52dDtTnHPrSgpVmr5fYuqF/sLj6r4jGzJ3AkkwZTUzhjn1Ko2a sA/aSXUQvvUKL1VG5GcWDbFgZNQL79x9+/OQ5jLh/aN9+d5goWUrezPjFynoXfjFY5ov Kucg== X-Gm-Message-State: AC+VfDyMgv7hGZbZdhAHhiXTvhVB67lP06i5OEgLy8Uf4o/dn1KVj5d0 xtMN1MYFMslkDYPgJVZACpY5UFYxfZQtILkhVL4= X-Received: by 2002:a17:906:6a04:b0:988:a837:327a with SMTP id qw4-20020a1709066a0400b00988a837327amr22018537ejc.44.1687866705562; Tue, 27 Jun 2023 04:51:45 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.204]) by smtp.gmail.com with ESMTPSA id h14-20020a17090634ce00b0098238141deasm4478624ejb.90.2023.06.27.04.51.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 27 Jun 2023 04:51:45 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: David Gibson , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , qemu-ppc@nongnu.org, Paolo Bonzini , Greg Kurz , kvm@vger.kernel.org, Nicholas Piggin , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 3/6] target/ppc: Move CPU QOM definitions to cpu-qom.h Date: Tue, 27 Jun 2023 13:51:21 +0200 Message-Id: <20230627115124.19632-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230627115124.19632-1-philmd@linaro.org> References: <20230627115124.19632-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=philmd@linaro.org; helo=mail-ej1-x62c.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: Cédric Le Goater --- target/ppc/cpu-qom.h | 5 +++++ target/ppc/cpu.h | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h index 9666f54f65..c2bff349cc 100644 --- a/target/ppc/cpu-qom.h +++ b/target/ppc/cpu-qom.h @@ -31,6 +31,11 @@ OBJECT_DECLARE_CPU_TYPE(PowerPCCPU, PowerPCCPUClass, POWERPC_CPU) +#define POWERPC_CPU_TYPE_SUFFIX "-" TYPE_POWERPC_CPU +#define POWERPC_CPU_TYPE_NAME(model) model POWERPC_CPU_TYPE_SUFFIX +#define CPU_RESOLVING_TYPE TYPE_POWERPC_CPU +#define cpu_list ppc_cpu_list + ObjectClass *ppc_cpu_class_by_name(const char *name); typedef struct CPUArchState CPUPPCState; diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index af12c93ebc..e91e1774e5 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1468,12 +1468,6 @@ static inline uint64_t ppc_dump_gpr(CPUPPCState *env, int gprn) int ppc_dcr_read(ppc_dcr_t *dcr_env, int dcrn, uint32_t *valp); int ppc_dcr_write(ppc_dcr_t *dcr_env, int dcrn, uint32_t val); -#define POWERPC_CPU_TYPE_SUFFIX "-" TYPE_POWERPC_CPU -#define POWERPC_CPU_TYPE_NAME(model) model POWERPC_CPU_TYPE_SUFFIX -#define CPU_RESOLVING_TYPE TYPE_POWERPC_CPU - -#define cpu_list ppc_cpu_list - /* MMU modes definitions */ #define MMU_USER_IDX 0 static inline int cpu_mmu_index(CPUPPCState *env, bool ifetch) From patchwork Tue Jun 27 11:51:22 2023 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: 696838 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp3724708wrm; Tue, 27 Jun 2023 04:53:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6TgcEwRqvHRK0pyy190Ms7XPq6KV/db/DBzZB0gYRQNBHEQYH4sxTdvjabXqwtc3oKP8Ft X-Received: by 2002:a05:620a:460b:b0:765:41c3:9452 with SMTP id br11-20020a05620a460b00b0076541c39452mr16986299qkb.66.1687866786665; Tue, 27 Jun 2023 04:53:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687866786; cv=none; d=google.com; s=arc-20160816; b=MtgPeRa6CJEmBZAQqtARgc3+/Des3/aRjsLinzJtrnEcI2JlmzoSZzaugAbcmehzga 9BWlTHVqzq2d71i5XXwMNZpL42iQYSiFqtahi3Ni6fqnfhbHsGh0mNKBLQJfli5hG16h dTdxQjqiMKAn1n1D67SHH5Sqa/Zwlu1CzkqCfjllUOHBenFItZBHnHa/PiWDMHnyCGEu 7QKSYDxV1nOu85xmJnjxV0UWlbAh5EUf49h+vTc4XBBXEV3NrkKq3bLxn7/H/KYtqQtE k94CtQk73jfaenjNHjsGjHFQ7p04BdC5Y/hczqs4Tgdjq+gysITKSviamPwn3kiTSAHs hd3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=TGZXRn778tTjabpObTTq7zFLfhDFVmkSDdvtG4Gr8rE=; fh=HTfWIrJzOLTRsca7VdqVkZSV2mA14Yhlo/G1nQOSMq0=; b=GKfHsubWjrfTNH6Rw8B3YbyzRxoTefOmDdwf+MO+KILBoxKQsomqXrg6t9kkM1SJ99 u389+KncFmt9zWe1ILWoNENLJN9n6jGyoJ0Jc5t4UEZDROnIdUUrW1lLxlnCQHC2VR5T XnKrI4CMDkqk0eV8OHlA2tuDQyMfJ2in/ETaRowcBaDGAHcXykdsHv9Uxi2B2dlFIB6M Rzhwz9/0jio+pSwnkgQQrd1ZE94MW1d3Emwy3/YGn2yI6/rGxC+CNVGSC3AXBYltbCJA e2a7nmK7v2XWW3/BlJJYUMl2uV44vVkrqWppcHV2jKuVcb4MAFqT79vLCYBOVgdu8scJ DJfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ivXPP7EE; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w17-20020a05620a425100b007670458fa9esi876875qko.385.2023.06.27.04.53.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Jun 2023 04:53:06 -0700 (PDT) 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=ivXPP7EE; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qE7Ek-0001w4-N0; Tue, 27 Jun 2023 07:51:58 -0400 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 1qE7Eh-0001vi-UT for qemu-devel@nongnu.org; Tue, 27 Jun 2023 07:51:55 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qE7Ef-0004lJ-67 for qemu-devel@nongnu.org; Tue, 27 Jun 2023 07:51:55 -0400 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-98e25fa6f5bso445117866b.3 for ; Tue, 27 Jun 2023 04:51:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687866711; x=1690458711; 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=TGZXRn778tTjabpObTTq7zFLfhDFVmkSDdvtG4Gr8rE=; b=ivXPP7EELHfP6sJ0l5qbHx5mCV8QlbwHGwSr7NB/wOhD6ru2flkDn3IF6/KjnLc1Sc RuPyAvov01ZLYBdsoZomj1ewZoI+FtwOEl+ccTsSDdOldyqu+FZwmlFqzaqtzYFbfs8P ce1DotNHn0nwCBkYyHAAx/Bd9+mhjvIj0Pyhk+o56mBDh/nXkkbTS71Ee83uhnydL9yI P77qRKp256o1b5l9IuNXT9ndDCwwreprJlClr4Q5c4N+b1Th9tj8Xpj+sbA3a1w9/BJR GOcbV8TtL+sewaMNfqzFZ2+sjHp2XuNJOG9liHKOZSwFlzeMYHcKGHdDLNplrav8YT5U JkmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687866711; x=1690458711; 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=TGZXRn778tTjabpObTTq7zFLfhDFVmkSDdvtG4Gr8rE=; b=M8MUoIDCyltfn6zHgYbdlCGs/mYWDrlN0PlVi1mOMBGhZUouPGfODWJ6QqWFYKkPwW x++TTD0bjbq8XLI7R15PxhCNmBQC30WMqzJRphBx2VgiSDo4V7zTciVAqWybBabUd6xK aZ4ezWdfvLqCeSo3ZJ19ASCtkoXU7frmWI1BcJ/yoQpDrxXPF7ww2zTY6x0ffB/G+UhI v+TSqoC/gczm/y22PqSMWGw8MUVX0CbGW5r8E8i7m7JKEBMeKZDHTDaJ426tQkTX0Ud+ IZQRU3fJQ92VDrYSUHDWvlblBQV3n+l+vqw06iUkWApyJP4z0GR17qjVO7Bhjc5rwXMm ORRQ== X-Gm-Message-State: AC+VfDwdfIsImLavHQ70Bzx6KV8WN7gP0Vb2vjqPD3BeFNUxdBDeqYuJ 8diaifcbZWkEN+FWW0L9azJZ12DalkP6VsT/cj0= X-Received: by 2002:aa7:d5d6:0:b0:51d:961c:8ad4 with SMTP id d22-20020aa7d5d6000000b0051d961c8ad4mr4856426eds.28.1687866711477; Tue, 27 Jun 2023 04:51:51 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.204]) by smtp.gmail.com with ESMTPSA id v20-20020aa7dbd4000000b00514a5f7a145sm3701418edt.37.2023.06.27.04.51.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 27 Jun 2023 04:51:51 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: David Gibson , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , qemu-ppc@nongnu.org, Paolo Bonzini , Greg Kurz , kvm@vger.kernel.org, Nicholas Piggin , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 4/6] target/ppc: Define TYPE_HOST_POWERPC_CPU in cpu-qom.h Date: Tue, 27 Jun 2023 13:51:22 +0200 Message-Id: <20230627115124.19632-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230627115124.19632-1-philmd@linaro.org> References: <20230627115124.19632-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=philmd@linaro.org; helo=mail-ej1-x634.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 TYPE_HOST_POWERPC_CPU is used in various places of cpu_init.c, in order to restrict "kvm_ppc.h" to sysemu, move this QOM-related definition to cpu-qom.h. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Reviewed-by: Greg Kurz --- target/ppc/cpu-qom.h | 2 ++ target/ppc/kvm_ppc.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h index c2bff349cc..4e4061068e 100644 --- a/target/ppc/cpu-qom.h +++ b/target/ppc/cpu-qom.h @@ -36,6 +36,8 @@ OBJECT_DECLARE_CPU_TYPE(PowerPCCPU, PowerPCCPUClass, POWERPC_CPU) #define CPU_RESOLVING_TYPE TYPE_POWERPC_CPU #define cpu_list ppc_cpu_list +#define TYPE_HOST_POWERPC_CPU POWERPC_CPU_TYPE_NAME("host") + ObjectClass *ppc_cpu_class_by_name(const char *name); typedef struct CPUArchState CPUPPCState; diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h index 49954a300b..901e188c9a 100644 --- a/target/ppc/kvm_ppc.h +++ b/target/ppc/kvm_ppc.h @@ -13,8 +13,6 @@ #include "exec/hwaddr.h" #include "cpu.h" -#define TYPE_HOST_POWERPC_CPU POWERPC_CPU_TYPE_NAME("host") - #ifdef CONFIG_KVM uint32_t kvmppc_get_tbfreq(void); From patchwork Tue Jun 27 11:51:23 2023 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: 696837 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp3724672wrm; Tue, 27 Jun 2023 04:53:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ48m17GnZ+khvwwFl3R8MJ82kpeGsOhWnXCukTb1YKOkU4x+97AKyFtvF669ua+L35zsl2o X-Received: by 2002:a05:620a:f07:b0:765:8986:a3bd with SMTP id v7-20020a05620a0f0700b007658986a3bdmr6698922qkl.69.1687866780238; Tue, 27 Jun 2023 04:53:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687866780; cv=none; d=google.com; s=arc-20160816; b=bS38Ssaw4lpdrAZ3+hbz2h8zicbuVsMM8rTkBz7RKXK6TmqpQyw3qMA/F0jvoMxrF5 g+6jJUuBpYXTu9xy0h0lxkadjuAlguc1CJYZBQiztaikmcETWxI2FfnPq4Jj9iPWT7UD aNb9dVKr2s3gOwRqZ0dTNzBrzOxOo5IahD0YoT8qrWJ33O9ZN/KZ1TaDgmf2rGWI4Kdv B29n6tAUD9YXzjOiDXFW7noqFLEWF2cgzKtUi06OfBTECD5Fa0w5LZwBmuX+kK4peQMA fOCmQvCFaWqJcAbcXhaSWkDx7uejoqTTILy6fD2+fLqUiAXwhKpXDKwHngSqkqsga8/n E73g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=VO9Kit1sdoJ392FVmc33R5cx+Y6OihE9F+t/ncxHt8c=; fh=HTfWIrJzOLTRsca7VdqVkZSV2mA14Yhlo/G1nQOSMq0=; b=EeBySmJ0viTbSzpscbD16hIjAh1RC0QXiMItViDcIYSjszty8bBWUzKYqgpKSdueXp QD8KW3uTeM947BM9BwCFZHMjSBRlWj6GtEPQCZY6aK55VAW0QhJ98FUXI57yQtT0r2yi 09lRWNk2UbfOrMGc+X9As/xq8zrTh8haQoZSSaVTeWVtx/HSxJ/FZJUeForzHCUyjIzx GNcN9IIqtWJGTSWG34T4/4lNaasvP7Td6lRo6TGu0k3rcQGYDEwz/209lYO8h0fpzuYp 5M4cBefqGSv0Gjq7EdABy9H6Z1BTCfYRPPVHz9yQbt+QDlp7Qr7cwmgV3PiU9mWCZqZB Oq/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YT5YuAOO; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r16-20020a05620a299000b00767069d79e8si799258qkp.11.2023.06.27.04.53.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Jun 2023 04:53:00 -0700 (PDT) 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=YT5YuAOO; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qE7Ep-00020X-BP; Tue, 27 Jun 2023 07:52:03 -0400 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 1qE7En-0001zy-CN for qemu-devel@nongnu.org; Tue, 27 Jun 2023 07:52:01 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qE7El-0004nM-Oe for qemu-devel@nongnu.org; Tue, 27 Jun 2023 07:52:01 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-9920a6a6cb0so105715666b.3 for ; Tue, 27 Jun 2023 04:51:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687866717; x=1690458717; 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=VO9Kit1sdoJ392FVmc33R5cx+Y6OihE9F+t/ncxHt8c=; b=YT5YuAOOsTqqfatWHVtR5bkFlY0OTtUHvz/0s46L5ULvuQ9jKzUP8DdeP4Gvihrma4 p3ihWqPzfDEhIHOOPHC+rsh5mMYQeIQ3JnTnrFzesbzAqWnLmlojrINFWAaITg2IsoRa fFIVnpjnh0gaHLZeA0mtf9bEsjWc7j+R1jKgwpen8bJanw32gRd8dXnt/1Jln2WieGxc SfADtn16kwQiMn1ONmCxcXlGIEhWJ91N3aoLX3XCIWTMHMS7sJOPVwM7N15G+1CRoRf0 cb1rzlPPnpb0DCmjSUxVMvNUof956VdbGliqmdPEL8p2bsAS8PUXfgobj2cWf3KG5MOu rvAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687866717; x=1690458717; 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=VO9Kit1sdoJ392FVmc33R5cx+Y6OihE9F+t/ncxHt8c=; b=gmFym7uPN2L03nCCNwNT/dJvqXLEDdo111gt0KoGLKbWhyollcJyYcqwCNJDi47KjO SeSan9uSu1yZCbJxslMd1LcvHLg3Sp7kZGiVGMEvNs5mOF9t/TBlj0/9pM47dP8cnO7B 3tEbGomhz1Kci1Wn7vsTtfFDiHJGi7FV/Za2/5ZRPKjAzAbmCBVcduz6p3IObu67OKmW LDWXEoZVNUYom00GBoS5Mhje/9ckzfGZW2lTj9nimnxzMkvgMm5LyM1p2X8DY8CHj7ll uyN2AKj8sZyTire0KIqviyRdnB5/m32VbbEUMiD/5tScWt2AiBmvFJhqwLtmF+tdE/tA nwwQ== X-Gm-Message-State: AC+VfDw0BSR15uB4OJrjiANd25Va3H8VqXwxfkUaE7MciEmLpBZjxitp huy4vMoyZ8fP/aDGTHLnxB6nHiEVwFGnAULdk0s= X-Received: by 2002:a17:907:9450:b0:989:3670:3696 with SMTP id dl16-20020a170907945000b0098936703696mr17867636ejc.58.1687866717193; Tue, 27 Jun 2023 04:51:57 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.204]) by smtp.gmail.com with ESMTPSA id a2-20020a1709065f8200b009827b97c89csm4455614eju.102.2023.06.27.04.51.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 27 Jun 2023 04:51:56 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: David Gibson , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , qemu-ppc@nongnu.org, Paolo Bonzini , Greg Kurz , kvm@vger.kernel.org, Nicholas Piggin , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 5/6] target/ppc: Restrict 'kvm_ppc.h' to sysemu in cpu_init.c Date: Tue, 27 Jun 2023 13:51:23 +0200 Message-Id: <20230627115124.19632-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230627115124.19632-1-philmd@linaro.org> References: <20230627115124.19632-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=philmd@linaro.org; helo=mail-ej1-x630.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 User emulation shouldn't need any of the KVM prototypes declared in "kvm_ppc.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Reviewed-by: Greg Kurz --- target/ppc/cpu_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index aeff71d063..f2afb539eb 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -21,7 +21,6 @@ #include "qemu/osdep.h" #include "disas/dis-asm.h" #include "gdbstub/helpers.h" -#include "kvm_ppc.h" #include "sysemu/cpus.h" #include "sysemu/hw_accel.h" #include "sysemu/tcg.h" @@ -49,6 +48,7 @@ #ifndef CONFIG_USER_ONLY #include "hw/boards.h" #include "hw/intc/intc.h" +#include "kvm_ppc.h" #endif /* #define PPC_DEBUG_SPR */ From patchwork Tue Jun 27 11:51:24 2023 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: 696835 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp3724631wrm; Tue, 27 Jun 2023 04:52:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4W0YkNRLvnXa7k/jVURXMy3abXdwp+a8oMijm3G6dc7m2v/dB1GKL+TxicBO+WNdgXra8C X-Received: by 2002:a05:620a:29d5:b0:766:c76f:124c with SMTP id s21-20020a05620a29d500b00766c76f124cmr5975350qkp.42.1687866773567; Tue, 27 Jun 2023 04:52:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687866773; cv=none; d=google.com; s=arc-20160816; b=NLxdpxEHEPiDoMBK6b0IQtE15UnTtdwk+xDIVst3SV6dqNO4ESVtShjq0H4gVf4L8L nXKup/Nn93p5RL9mhkEUQQ++d99vgxDvA29Oswv/EPXxiaTRhEBA+1uk5OG7+I0gppxd VFybaBjrrmCmu8UFE6ekr1kiDPMMcxUvRoK+haInWYJ8fXnZPooBdEvJk1eFIfcFsCmL 1Q5IzriN8y40V/0GkjdxWKAlORzAo55n0hLIFHW4j2GML416T40VYZakPpFBf0CG4INf ++vATUH8zWa53kXX2OHfcnJxiV+KjPJ4IA1T75GzEJyttGljgI+32NiygJ2njjPLpRl9 07sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=Exw+JZXOL4uO7+3m9iYv0CMoNufl6q663SemmcVGUDs=; fh=HTfWIrJzOLTRsca7VdqVkZSV2mA14Yhlo/G1nQOSMq0=; b=o6WxvMo9Zd6YCp0b0iei74MdOj0mOJmtgkPCKQJPzJobBFpM8KuExh+yRSGVX2kTQD qNLhHgVqNMbvpgvDqidvlGXAscy0Xpw/12gatGabuhe2wRGLIqJHgzsAxEKqJ9UtVnu0 3hEZIMWYbz3KtLrGiBlQZTma91o+9C9glkrY2CWNMdQbeQ7DNw6vt/p/gGwDufLDEQxv MFYBoKAHV1GpUEmIk/TY6PsSYTgJ8Nis+AUwk72fmTzcEW6Zclng+KBqQi9TSUkU1zze dcOSwD0JQmu5JkrpdBsinV2nvnlx56Y7Lrom8K5Wh40K+ABBe9s/lJMYi372zGkA4i96 E8bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D243fL8Y; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ts13-20020a05620a3d8d00b00765acf3f32esi1552636qkn.351.2023.06.27.04.52.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Jun 2023 04:52:53 -0700 (PDT) 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=D243fL8Y; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qE7Eu-00025c-9N; Tue, 27 Jun 2023 07:52:08 -0400 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 1qE7Er-000248-V2 for qemu-devel@nongnu.org; Tue, 27 Jun 2023 07:52:05 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qE7Eq-0004oK-Cj for qemu-devel@nongnu.org; Tue, 27 Jun 2023 07:52:05 -0400 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-51d805cb33aso4575520a12.3 for ; Tue, 27 Jun 2023 04:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687866723; x=1690458723; 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=Exw+JZXOL4uO7+3m9iYv0CMoNufl6q663SemmcVGUDs=; b=D243fL8YZ2ilzOwTH/R8fl1t9I9RYRViHPE68ZXBeP+S469Nr7nvuq4AqADY5HOsyu zq9quS90T8MgbQ7+yyRMLjcPtSE347AwW60WlQ5t5OYGSNaz7KMjHMqpR7rujdO0iMOA aryT5Wtx7M4p6y+JSfmdYDUCxAileqJkzUDSh09Pd7zzPJF5NxyXSdYhWqjSx0z7vcH6 7COGTXxcsk0Z+/cqu6QwPo0GsQRk5kPyiXvWmbRjqTvBaPU8ZKuhCKlUhnOUzOGLhqBL sIRRkvo2lkxuucS9iU0L65KEQvNQJP1J0HA58464MLtV2nvdEqSTC3ASlRMC5nMBKKHW ZlWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687866723; x=1690458723; 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=Exw+JZXOL4uO7+3m9iYv0CMoNufl6q663SemmcVGUDs=; b=doK12Wtnfms1jq4fX5v4uUZQlWiSCnGENYPd8VoAIuHp72tQAEsw/0iIiOQl7jGyWf xCHSDLRQO+qwGJs6mznxnAnb8XQCt4jRu3HXYUaRB25MbHG/bIpjxnCXyCwkdy3yXiaH ByrF0jWTfZNt0ZDY8P6D74+HVPbI8cwuFZsQA7wCWz+ri33qkwzdMGBhTDiOSLoUvdrl umpZATDojRuEUN7200LbVGg/3PjfqwWdO4Y6od0SVZUp+GMLrqqv4RuyKjpT//YuY2BA TuQQQt0sg+O2OmSSGi2VzEmc3QfUOUolhIycBtvOUIYqvSbXPNYEhnybBur+fzBos8vS jRDQ== X-Gm-Message-State: AC+VfDyzttgdXULpvY2b/Wl+GoSFE7YVBe1x//CYpqaFx0ZJa+eaomN2 0hfhb04wWkaOZzqlwJVGf6FzG68qVHOGIJjlN1A= X-Received: by 2002:a05:6402:498:b0:519:b784:b157 with SMTP id k24-20020a056402049800b00519b784b157mr20050286edv.12.1687866722978; Tue, 27 Jun 2023 04:52:02 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.204]) by smtp.gmail.com with ESMTPSA id q14-20020a056402040e00b0051d890b2407sm3384524edv.81.2023.06.27.04.52.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 27 Jun 2023 04:52:02 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: David Gibson , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , qemu-ppc@nongnu.org, Paolo Bonzini , Greg Kurz , kvm@vger.kernel.org, Nicholas Piggin , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 6/6] target/ppc: Remove pointless checks of CONFIG_USER_ONLY in 'kvm_ppc.h' Date: Tue, 27 Jun 2023 13:51:24 +0200 Message-Id: <20230627115124.19632-7-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230627115124.19632-1-philmd@linaro.org> References: <20230627115124.19632-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=philmd@linaro.org; helo=mail-ed1-x52b.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: Cédric Le Goater Reviewed-by: Greg Kurz --- target/ppc/kvm_ppc.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h index 901e188c9a..6a4dd9c560 100644 --- a/target/ppc/kvm_ppc.h +++ b/target/ppc/kvm_ppc.h @@ -42,7 +42,6 @@ int kvmppc_booke_watchdog_enable(PowerPCCPU *cpu); target_ulong kvmppc_configure_v3_mmu(PowerPCCPU *cpu, bool radix, bool gtse, uint64_t proc_tbl); -#ifndef CONFIG_USER_ONLY bool kvmppc_spapr_use_multitce(void); int kvmppc_spapr_enable_inkernel_multitce(void); void *kvmppc_create_spapr_tce(uint32_t liobn, uint32_t page_shift, @@ -52,7 +51,6 @@ int kvmppc_remove_spapr_tce(void *table, int pfd, uint32_t window_size); int kvmppc_reset_htab(int shift_hint); uint64_t kvmppc_vrma_limit(unsigned int hash_shift); bool kvmppc_has_cap_spapr_vfio(void); -#endif /* !CONFIG_USER_ONLY */ bool kvmppc_has_cap_epr(void); int kvmppc_define_rtas_kernel_token(uint32_t token, const char *function); int kvmppc_get_htab_fd(bool write, uint64_t index, Error **errp); @@ -262,7 +260,6 @@ static inline void kvmppc_set_reg_tb_offset(PowerPCCPU *cpu, int64_t tb_offset) { } -#ifndef CONFIG_USER_ONLY static inline bool kvmppc_spapr_use_multitce(void) { return false; @@ -322,8 +319,6 @@ static inline void kvmppc_write_hpte(hwaddr ptex, uint64_t pte0, uint64_t pte1) abort(); } -#endif /* !CONFIG_USER_ONLY */ - static inline bool kvmppc_has_cap_epr(void) { return false;