From patchwork Tue Oct 3 07:04: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: 728715 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp2008116wrt; Tue, 3 Oct 2023 00:05:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRgnZbbkl97c9tMVrNSxJfsl9OHtDzGuZnO4Ur70X/wzp47OiTQnvFBfpHpoEXOH1wa62N X-Received: by 2002:a05:6214:5788:b0:63d:2de9:cbbe with SMTP id lv8-20020a056214578800b0063d2de9cbbemr14617187qvb.20.1696316759468; Tue, 03 Oct 2023 00:05:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696316759; cv=none; d=google.com; s=arc-20160816; b=K4n0mjDP5PuJMuUSLSfxtE9dL27iexf6i5jec9XmTNcLNT8CdzhUlsdbjmGqmhaTTr FdC7ZITIXKi5fCBTd8s2MgpUVp0bnWs4Ks7Twnf82ACI0zOA0Zm/bssFb1y1eaYaGkl5 MDRJsKbuU0shZ/h34E2dlNNLzdXHIxR/jOdUuzfdZKt+p0I18Jshhk/2gbCS7K2GWkUr mAXUQduhtCttP6GR96mAfM1a9HqvKeD1hYkIzmF7dpZkMHSb/DSwnjjBGd5efOuYDdpK S2JhXw46OF1BiGYhjhnAkAfx+Num1GT0irfd1pa+o4ogHASFtBUVQLySBJcp3TKC7MDV GK1g== 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=ck9fFBQ6PJmRxQ+9dHxfsblvqg5P8PS2Huy1TTlnqL4=; fh=stgTJ6meyq09O+0pY4Hopx/UalDJyGpmOS4HF8vYwWA=; b=02K5IfqxVudXeLdSEjp/EiuhJru3SitX0jdUTQKIs/g28kvI79j7dVH8qnLmrru1Ti Mhx+DA/OOQ2aDaXE2GsHDvHr+pHgVNol3SmjuWiqJYqgTGLjxuSxSQ2XNsJUP+M84OgK WyiuVr7DQaviauiS3unvlaxrDMq24gnT470kK47yTJ4eb1nawCXhQwya/fB0vw3vDP+b mB9O3Rntci9zZ9+AjWJVi/BIkRhfLCox3wWo1PnlMYOctpjCoR+iPefjM7Uefmit2elU y3ci8d6BGKJEpZ85KoVMVKbXOklS4R+T8BJ/LhVP7DaIirKek7KcgnkPEn9hKui25fP6 GI7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m6kJrcCZ; 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 e11-20020a0cb44b000000b0065afc346b27si254516qvf.28.2023.10.03.00.05.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Oct 2023 00:05:59 -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=m6kJrcCZ; 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 1qnZSW-00016d-Kl; Tue, 03 Oct 2023 03:04:44 -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 1qnZSV-00013B-4n for qemu-devel@nongnu.org; Tue, 03 Oct 2023 03:04:43 -0400 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qnZST-0008QW-CA for qemu-devel@nongnu.org; Tue, 03 Oct 2023 03:04:42 -0400 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-5031ccf004cso623951e87.2 for ; Tue, 03 Oct 2023 00:04:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696316679; x=1696921479; 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=ck9fFBQ6PJmRxQ+9dHxfsblvqg5P8PS2Huy1TTlnqL4=; b=m6kJrcCZHiYNmzY2lBjyGVtOFZK4A84Xw7yTWoKJXUhmUYn0v1aNCTm61mIXwPQ3Xs 7qQOmVOAdZzgP5chBuO/7a6UHJJ7Y8Pan6HBF/KECGq+EENe8ouCwKruBcQTkjK0hYg5 LytSrkFLF+WZWTpmZHM4m2jWqSZJiosO5Pe1AZviZ9zontZ+QSY8dlJkE7Wy/lQ2ACIx B4sRgWKvV6TORpaC/QkGYUxylCwrLyOeuj9hzFM0ZGD8PsTIbdvKo+LA/5zC5L0ECKb0 qHXZIjAySQK+v3EY0TMc9djySVeW8lLmXI+CaNpg/wXBqwr4yLQd9V9szIMeIrp71Z+d oVig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696316679; x=1696921479; 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=ck9fFBQ6PJmRxQ+9dHxfsblvqg5P8PS2Huy1TTlnqL4=; b=Ac4dQoTMMIymF/9KAQJIgOErTECSONEs31UIqmrg+ah5dM9xiA5ClW6fLaKh7jbf7P YaVclKrfQR8XhJKP6gzqffC4f5yIDNkqCeqGsAIKggkOFEA2z4ce/qFbca6Kpu7677uO JqiUA/nNWWQ0WO2zOsGBwLina4hqK0EURSMeVQ23iTk5KaKipLVTSXGJZwdIBFEKfGjz t9Z/rPwy5An5Ah91xMnTslrGW9TQkoW5HyRtv/YmWPQMfp0nOeWNqvTNvdPItMOoXdFz oF4fPBeUKIJwN1tijeTT0zmpnydV3kI3xQndXKguySOZr2yAZLyv84SrSwzCu2Ytpvbh eRgw== X-Gm-Message-State: AOJu0YzDWE2sJHBTVUcYhwnp/JxOG1v1kTrgXrKlPFCVqozuo+4CYyOQ fZzWIiAT1Lk+Wkgi8h+Ma+BAb8zoStZ3K1/bggKC8g== X-Received: by 2002:ac2:4567:0:b0:503:383c:996d with SMTP id k7-20020ac24567000000b00503383c996dmr10962753lfm.12.1696316679009; Tue, 03 Oct 2023 00:04:39 -0700 (PDT) Received: from m1x-phil.lan (176-131-222-246.abo.bbox.fr. [176.131.222.246]) by smtp.gmail.com with ESMTPSA id a8-20020a5d4d48000000b00324ae863ac1sm828475wru.35.2023.10.03.00.04.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Oct 2023 00:04:38 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Daniel Henrique Barboza , David Gibson , Paolo Bonzini , kvm@vger.kernel.org, Richard Henderson , =?utf-8?q?C=C3=A9dric_Le_?= =?utf-8?q?Goater?= , qemu-ppc@nongnu.org, Kevin Wolf , Daniel Henrique Barboza , Michael Tokarev , Greg Kurz , Nicholas Piggin , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 1/4] sysemu/kvm: Restrict kvmppc_get_radix_page_info() to ppc targets Date: Tue, 3 Oct 2023 09:04:23 +0200 Message-ID: <20231003070427.69621-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231003070427.69621-1-philmd@linaro.org> References: <20231003070427.69621-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::134; envelope-from=philmd@linaro.org; helo=mail-lf1-x134.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 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 kvm_get_radix_page_info() is only defined for ppc targets (in target/ppc/kvm.c). The declaration is not useful in other targets, reduce its scope. Rename using the 'kvmppc_' prefix following other declarations from target/ppc/kvm_ppc.h. Suggested-by: Michael Tokarev Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza --- include/sysemu/kvm.h | 1 - target/ppc/kvm.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index ee9025f8e9..3bcd8f45be 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -551,7 +551,6 @@ int kvm_set_one_reg(CPUState *cs, uint64_t id, void *source); * Returns: 0 on success, or a negative errno on failure. */ int kvm_get_one_reg(CPUState *cs, uint64_t id, void *target); -struct ppc_radix_page_info *kvm_get_radix_page_info(void); int kvm_get_max_memslots(void); /* Notify resamplefd for EOI of specific interrupts. */ diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 51112bd367..19fe6d2d00 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -268,7 +268,7 @@ static void kvm_get_smmu_info(struct kvm_ppc_smmu_info *info, Error **errp) "KVM failed to provide the MMU features it supports"); } -struct ppc_radix_page_info *kvm_get_radix_page_info(void) +static struct ppc_radix_page_info *kvmppc_get_radix_page_info(void) { KVMState *s = KVM_STATE(current_accel()); struct ppc_radix_page_info *radix_page_info; @@ -2372,7 +2372,7 @@ static void kvmppc_host_cpu_class_init(ObjectClass *oc, void *data) } #if defined(TARGET_PPC64) - pcc->radix_page_info = kvm_get_radix_page_info(); + pcc->radix_page_info = kvmppc_get_radix_page_info(); if ((pcc->pvr & 0xffffff00) == CPU_POWERPC_POWER9_DD1) { /* From patchwork Tue Oct 3 07:04: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: 728714 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp2008003wrt; Tue, 3 Oct 2023 00:05:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG4Zj+PtgWNOvThJS59eZ1DuDw4KwfoJiA9vYsVnlJqSKG1e8R7nN53xbaAVa1UbffenGxm X-Received: by 2002:a0c:db93:0:b0:64f:8d4c:1c0b with SMTP id m19-20020a0cdb93000000b0064f8d4c1c0bmr14538678qvk.43.1696316739323; Tue, 03 Oct 2023 00:05:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696316739; cv=none; d=google.com; s=arc-20160816; b=x3+nsFP52oIM4dLXNqXgKwDMSa+3yy650UsBuI+5TV3WdLu/De/V8Dd5ug9OMbJ/Rr zg5Ah2xLTTE1LlSKc9zt33Zmjwpk/l+RhIaZo2ZlginMs/xnk1nnk7Zzdwisp4tb9OZO VwB+UmyrjKeGlPqipYdA/YxcwvT/72iGhix1p1vPkp4bUAJFir7YnhxL5eX3DSdfhYJb LDJzXfX74KvG/qdBKGp9TLnxU8Njbp13Lf7eAmE7yd+am+U4qasKzEVZpTH43TLrbfJe /qwJ1FQOhnHNVP2r3wqOZDVSWbE6f/bsuqJ7Z/Rq+rFEo+AFzgDUq5xuH4NlZatgGCRc +dLA== 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=bgpXhinNPnFvZKdeMS+qc/3fubRg8oTbm/EUaTedB+8=; fh=stgTJ6meyq09O+0pY4Hopx/UalDJyGpmOS4HF8vYwWA=; b=sRkYWV34B8P7F9gQ93zwkLjasmeOyMGk9wujCwh2+C0RCvfZBUKRMjQnTeNMiJEFB3 1MCV4TIvE2Yg7r1O+H2u3aLCIksvDYdIwRZP43bheqxzRp2E8c/CFtfNsIGeri8qbFaO qGwhnvYo24v04Fpl3n9UQaaUGnz2cg03fcAlZZdTkpQu5vtwxhQ8oZ18usIDAa8ZFWyP kbiDFDHt2pAJYWvhDElw+/l0oelrkUlbUiDSGz6eYlB6qbsmA03syH5lxYGJ+xXRXXUS MjsBkQwJdzsZL85o6Vlu1ou23poJgI4HL5sIqyW+cbW/+rTf002yb2px1UG4YbEoTB4Z E0Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FTJaJ5m1; 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 d14-20020a0ce44e000000b0065b0dee874bsi246311qvm.218.2023.10.03.00.05.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Oct 2023 00:05:39 -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=FTJaJ5m1; 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 1qnZSc-0001Ax-Ve; Tue, 03 Oct 2023 03:04:50 -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 1qnZSb-00018h-64 for qemu-devel@nongnu.org; Tue, 03 Oct 2023 03:04:49 -0400 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 1qnZSZ-0008RE-GM for qemu-devel@nongnu.org; Tue, 03 Oct 2023 03:04:48 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-405497850dbso5796555e9.0 for ; Tue, 03 Oct 2023 00:04:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696316686; x=1696921486; 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=bgpXhinNPnFvZKdeMS+qc/3fubRg8oTbm/EUaTedB+8=; b=FTJaJ5m13lVjAGNs0BbqdWZxblDAF6SxcdhZa4W5Hf//I6P9GZUHT2zYRvBb5hXyK4 lC5o7Sjs8r4jeWeKz0LmvMorLgFAicI6gMOnRbOWICeGpTeR+8La28BlB2EbdLwe2B65 fRUbp7+t0ZQ3/3T5gofUpim7Lm6L0EJVJNPJdi/PFDBD/N1yoF2Te5fHE3lavigtL6kV 4IcLggKSbNnJsAPsdGcGE8o46dRjZmCoPjClLzsk3Qhy1loKpzdX05pscPd1U+qAtf6S uqAQWaB3oSfW0+6XxMf2ARvhLJFLcv4ezx2TrirLmMQ4DuBzrI8QSMT1itXNpGbMpLl5 QWYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696316686; x=1696921486; 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=bgpXhinNPnFvZKdeMS+qc/3fubRg8oTbm/EUaTedB+8=; b=g7ClaecQ/kzoTAaZmwfbDNML2fu9rnKUE1qrHVarUMKWi/J+/F7wuulI2YrATAgVhs fEnA84stq4f6bl7OGW1bg83Dz8cQOdboRK6BXlo+vG4TANIcTjC2aiqlOE82yq7nFlIT uzKXQhiQiKoxgeydfI2ChYPpCZLuEl0vihtSaiHnzF7lmsIVYOcUHmV0ihkdz+IvvUMa mwd9BjXQ7w/qSK0G1Khvk5zGlgt00ItxMkZBzFzQ8wEPVyeZhEueFaAwUPAHqmwCmGLH SBGeEWh8ZSJXvyAKI9GUO138tjGPaIQSestC6hIr5NK9b21oyfxVcFYCcOuDctFHkivo EqOw== X-Gm-Message-State: AOJu0YxNGVEgxANDSCC6KxZnyLSKYzofzOWIYEdDyu5xq5QGN8WP9Spm /CfURj0A/98UFK8fWkXuRUTtEJ316nE+7dVqT63I4g== X-Received: by 2002:a7b:ce89:0:b0:402:f07c:4b48 with SMTP id q9-20020a7bce89000000b00402f07c4b48mr10778116wmj.28.1696316685763; Tue, 03 Oct 2023 00:04:45 -0700 (PDT) Received: from m1x-phil.lan (176-131-222-246.abo.bbox.fr. [176.131.222.246]) by smtp.gmail.com with ESMTPSA id y18-20020a1c4b12000000b0040642a1df1csm548808wma.25.2023.10.03.00.04.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Oct 2023 00:04:45 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Daniel Henrique Barboza , David Gibson , Paolo Bonzini , kvm@vger.kernel.org, Richard Henderson , =?utf-8?q?C=C3=A9dric_Le_?= =?utf-8?q?Goater?= , qemu-ppc@nongnu.org, Kevin Wolf , Daniel Henrique Barboza , Michael Tokarev , Greg Kurz , Nicholas Piggin , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 2/4] hw/ppc/e500: Restrict ppce500_init_mpic_kvm() to KVM Date: Tue, 3 Oct 2023 09:04:24 +0200 Message-ID: <20231003070427.69621-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231003070427.69621-1-philmd@linaro.org> References: <20231003070427.69621-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 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 Inline and guard the single call to kvm_openpic_connect_vcpu() allows to remove kvm-stub.c. Reviewed-by: Michael Tokarev Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/e500.c | 4 ++++ target/ppc/kvm-stub.c | 19 ------------------- target/ppc/meson.build | 2 +- 3 files changed, 5 insertions(+), 20 deletions(-) delete mode 100644 target/ppc/kvm-stub.c diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index d5b6820d1d..d0e199fb2c 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -834,6 +834,7 @@ static DeviceState *ppce500_init_mpic_qemu(PPCE500MachineState *pms, static DeviceState *ppce500_init_mpic_kvm(const PPCE500MachineClass *pmc, IrqLines *irqs, Error **errp) { +#ifdef CONFIG_KVM DeviceState *dev; CPUState *cs; @@ -854,6 +855,9 @@ static DeviceState *ppce500_init_mpic_kvm(const PPCE500MachineClass *pmc, } return dev; +#else + g_assert_not_reached(); +#endif } static DeviceState *ppce500_init_mpic(PPCE500MachineState *pms, diff --git a/target/ppc/kvm-stub.c b/target/ppc/kvm-stub.c deleted file mode 100644 index b98e1d404f..0000000000 --- a/target/ppc/kvm-stub.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * QEMU KVM PPC specific function stubs - * - * Copyright Freescale Inc. 2013 - * - * Author: Alexander Graf - * - * This work is licensed under the terms of the GNU GPL, version 2 or later. - * See the COPYING file in the top-level directory. - * - */ -#include "qemu/osdep.h" -#include "cpu.h" -#include "hw/ppc/openpic_kvm.h" - -int kvm_openpic_connect_vcpu(DeviceState *d, CPUState *cs) -{ - return -EINVAL; -} diff --git a/target/ppc/meson.build b/target/ppc/meson.build index 4c2635039e..0bff3e39e5 100644 --- a/target/ppc/meson.build +++ b/target/ppc/meson.build @@ -30,7 +30,7 @@ gen = [ ] ppc_ss.add(when: 'CONFIG_TCG', if_true: gen) -ppc_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c')) +ppc_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c')) ppc_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user_only_helper.c')) ppc_system_ss = ss.source_set() From patchwork Tue Oct 3 07:04:25 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: 728718 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp2008259wrt; Tue, 3 Oct 2023 00:06:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFvGmxYnr59uRdYp/fP931NV1YSXbjkUiePIzvtqAr1H2KFUqivmDNVahh5VP66Z/sXmGex X-Received: by 2002:a1f:c5c3:0:b0:48c:fc50:4292 with SMTP id v186-20020a1fc5c3000000b0048cfc504292mr9704977vkf.15.1696316781797; Tue, 03 Oct 2023 00:06:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696316781; cv=none; d=google.com; s=arc-20160816; b=UMkm+4/Dj+7HJD8gjbZGGT08vdBz/xI8Z0t/F/S/HFEHSWe51dri4fGiy4f6N4BhWQ Tt6s7PkW/i4jiAqE1TDOWkgLvuzSdXxb31lGIxAT4OgyvmO0aYeYd7GlUTKbhJ8aMUKL dd43JUnpAWty1HJ3nMyD+gkvj2u+zq1zcBtSRinFjBWoH2YabL57cl3ADEFnGJkK31qS joEwx0O4J674/Wgikm+nHeuyuotihv06qTGPwmy5qzkTi1nPEmFivMcBE+FyTAjmpL1X +dr++NiKXMB797ziRN7ecSDxpo69ICQgkBWXCveOiEWVu7vECFrt3T+yvp8mwBgzRGvT iujQ== 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=sQzhyHwmNDSDi5pTVRLTrtcYFBIcSrpF9DmpQnEWx1k=; fh=stgTJ6meyq09O+0pY4Hopx/UalDJyGpmOS4HF8vYwWA=; b=bMYKR/4n33fQfXOyAWOJ46NoM+jEOXeXDEdiXsO/Em1Srb6FTd3RsJkLL5m362Gv++ lgKokfv5rLV5qzZIXnIhx23MeUMvSt+CAjb1kHV3N+pLxbFHR6QJP53J1YBqVEOMGZxu +Y08/mCjy+gk/rUJx4LsSSszjk2A1zmh3jzj4khwcu0eAgI0YNxIE7Pxkv2glZ9sL+Hw aGV0qjNK8SX8mMigKPpgTXB36OLPpTwfK7zw1d3NroeTd9ZZEtRXgLF5M/lFOS7OODcR xb+HlutZafU3R67vB8Zwc+Jge5rrzLWTrdCxu8cXJwTKv8jXdyT2vzwyABxhjgof9Gys 6N5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OZu6YVHb; 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 d1-20020a0ce441000000b0065b17b925e3si250661qvm.444.2023.10.03.00.06.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Oct 2023 00:06:21 -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=OZu6YVHb; 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 1qnZSj-0001H5-1T; Tue, 03 Oct 2023 03:04:57 -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 1qnZSh-0001Em-Mc for qemu-devel@nongnu.org; Tue, 03 Oct 2023 03:04:55 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qnZSg-0008S0-7r for qemu-devel@nongnu.org; Tue, 03 Oct 2023 03:04:55 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40566f8a093so5530985e9.3 for ; Tue, 03 Oct 2023 00:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696316692; x=1696921492; 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=sQzhyHwmNDSDi5pTVRLTrtcYFBIcSrpF9DmpQnEWx1k=; b=OZu6YVHbTb/BLaIqAkrLJ3FPQoYRKNqWtCi6B60qQJP7C3g+pPkR4sdPAOwk3TMcot jktTOEbq2T9V9PE8Jp0SNyWM+RWaaidIOpOCxGKIyKVJtz5P1ueYqU6jF7PsbpOjT/HV SVQijkb+JVCqROgSABcyqdhM1zkUJGmiJsC12YSnqOnWGqH/4mVkqcnI4JAOrOrTfv2O jaLhgif4g1GjFomSFnzPYHfeZn1pnZLOioqMhw8f31QBeV9evCe5K2Xvilf4viTtmlyf KwWa7BhFP7YW3qSOijbVOreedVrBPy/E/smLwnR2u5v/jtUZtHzriH53Fn0ntmpmtYaL 9V6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696316692; x=1696921492; 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=sQzhyHwmNDSDi5pTVRLTrtcYFBIcSrpF9DmpQnEWx1k=; b=c410nJ7tV3GLPkLtLlUnrJee1/QOQtzPsR2P/n4Lmcorzds3P4pEGR572D3SOSrEhM tCO5LsHE8vvfmza52yTOc/iodZuPJEUHWPIsHTssC/sWGC3cjaua/+DDfOP45jcIQPz8 6sFTiLedKXTDj6SkomkLbhyg9i8xBinlsm5jIrwCTkDfv45YN0rPNSwGdKZyMWjxCrzY R9tOjb7Z9oFgZv0akTbgh85bQ7skMfJl9ozxSskCyQTFmati1n0bhIEEy3zp+TYYqzOR BLO0B3sgiAk+uWm3f3NjKeBZgF++pss1Ow1gifqFOOYRY49TC9aUdbIqJcZRKk945NQn svuA== X-Gm-Message-State: AOJu0YzzK0LTHLf+VGyH12F/tPJqan8F/W8l5ReH09NbTP9GPtZkCqZV a2XtX5YjsIAtvE5IIC1MKW6P+4i1/cXiYl48vjAioA== X-Received: by 2002:a5d:618c:0:b0:31f:eb6a:c824 with SMTP id j12-20020a5d618c000000b0031feb6ac824mr10944176wru.10.1696316692435; Tue, 03 Oct 2023 00:04:52 -0700 (PDT) Received: from m1x-phil.lan (176-131-222-246.abo.bbox.fr. [176.131.222.246]) by smtp.gmail.com with ESMTPSA id f5-20020a5d50c5000000b003200c918c81sm813270wrt.112.2023.10.03.00.04.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Oct 2023 00:04:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Daniel Henrique Barboza , David Gibson , Paolo Bonzini , kvm@vger.kernel.org, Richard Henderson , =?utf-8?q?C=C3=A9dric_Le_?= =?utf-8?q?Goater?= , qemu-ppc@nongnu.org, Kevin Wolf , Daniel Henrique Barboza , Michael Tokarev , Greg Kurz , Nicholas Piggin , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 3/4] target/ppc: Restrict KVM objects to system emulation Date: Tue, 3 Oct 2023 09:04:25 +0200 Message-ID: <20231003070427.69621-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231003070427.69621-1-philmd@linaro.org> References: <20231003070427.69621-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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 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 CONFIG_KVM is always FALSE on user emulation, so 'kvm.c' won't be added to ppc_ss[] source set; direcly use the system specific ppc_system_ss[] source set. Reviewed-by: Michael Tokarev Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/meson.build b/target/ppc/meson.build index 0bff3e39e5..44462f95cd 100644 --- a/target/ppc/meson.build +++ b/target/ppc/meson.build @@ -30,7 +30,6 @@ gen = [ ] ppc_ss.add(when: 'CONFIG_TCG', if_true: gen) -ppc_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c')) ppc_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user_only_helper.c')) ppc_system_ss = ss.source_set() @@ -46,6 +45,7 @@ ppc_system_ss.add(when: 'CONFIG_TCG', if_true: files( ), if_false: files( 'tcg-stub.c', )) +ppc_system_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c')) ppc_system_ss.add(when: 'TARGET_PPC64', if_true: files( 'compat.c', From patchwork Tue Oct 3 07:04:26 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: 728716 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp2008256wrt; Tue, 3 Oct 2023 00:06:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGCm/Wys3hjdHfV6CSqBt/Kp9Ys3f/jFT7s0Lf5K/q5D0f6/J2LSfOjdXMWd/m+fuz/k38k X-Received: by 2002:a0c:f1cc:0:b0:647:2653:bcc with SMTP id u12-20020a0cf1cc000000b0064726530bccmr2115989qvl.13.1696316781356; Tue, 03 Oct 2023 00:06:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696316781; cv=none; d=google.com; s=arc-20160816; b=T5BAfbi584nYYum2EEnsOpCPqMBZ6Grl+2ZgAD0IzpMkss4ZqKd3gKn/QHvlXIWjKr WPAPnI4EIYSWBeybSTV2OsmRaU1z1aBum797ixymdTnAyZRpnkUy+rScIeC2cd5g5IQ8 m0Ij5ie/wTRteEdY1n7uenIH3N6xHqyQkZZb15Ot7mB/dCinQ9ZAX7M2pU9rin4vMW1F miFXBwxZqoucj/XLEyCH1xh8nZEBcLhY6Pk/7463meZcvZ4/+jcMsKHs4jOoI/JST1ph 6Tjkuhap/OELms2VvR0AeJYCdmUGuTnJ8HbSTb8zL5IIUFPLLiK1yJSkJsswTW6xhkui xHeQ== 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=4dGNWXL4bt/YZVly7d1oK3PqrthsZjp41Sj7J9uNPxE=; fh=stgTJ6meyq09O+0pY4Hopx/UalDJyGpmOS4HF8vYwWA=; b=p7mqx1KgBMgmYvS+ZqlsyOqBQejW7UUWC1Djgr6+G/knEb7F7bkC1KLqAySIiYMUfr TiHTPBv72yKIObRuH3ByxHi0quXU3iEpn53Eq6cI9gt75mGU4r/cvQhTtOodH0B14u54 IkAFxxj2pLdRcPcH139eVjJjH5kyV6V02DRHSZGKB2Brhdp1wGO+TUTDW3TWDV9a6QOM 3HlCyWcJwE3NQM8bW8S7BoapzXRE0joUOIWFqqceXHBUbQK9Hrs8JeK1V2w0z2juGEjM 0ONx8vN69bBtQGwKcFSYp2nsc6F7jWCIpDgcDPcSoDqfmPwmN9+XDpH0pxgyd6+cXtCn 18gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fdnvxRmh; 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 w1-20020a0cb541000000b0065b23aea95asi255726qvd.11.2023.10.03.00.06.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Oct 2023 00:06:21 -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=fdnvxRmh; 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 1qnZT3-0001ZX-IT; Tue, 03 Oct 2023 03:05:17 -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 1qnZT2-0001Yh-7W for qemu-devel@nongnu.org; Tue, 03 Oct 2023 03:05:16 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qnZSm-0008Sm-Oz for qemu-devel@nongnu.org; Tue, 03 Oct 2023 03:05:15 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-32799639a2aso616234f8f.3 for ; Tue, 03 Oct 2023 00:05:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696316699; x=1696921499; 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=4dGNWXL4bt/YZVly7d1oK3PqrthsZjp41Sj7J9uNPxE=; b=fdnvxRmhb4A2CQCjmKssDKnkUYSnnGsMegiRMQbnuXhjQaUXo5kb4GESYSc/PR/+oS bwr9uag2cuEHBf0/bQWIaaC+SHt0fzlpN15z7L17kE+PVdU3oT3BBdWFwen/Sixg5Brl GX5cgJq6ALjrQBKQnuQmUtnshukN4t18hHShThu+j5m4G1YMDEq57ZwGy3yalLxTPCVQ P8EwR1BtL8DRPFKRsB4pR6u/PTxpoxxLmMI2o+YMpMFB3fT6gUYQkC0zTz6j+JDFJzpQ C8n8U/szhxQQCqyBWlu1/ro7jbG5+7m+mLYGPVskHmnCpf6Y8VJGji51/3YsoF8bmh2h kqdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696316699; x=1696921499; 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=4dGNWXL4bt/YZVly7d1oK3PqrthsZjp41Sj7J9uNPxE=; b=sdrzbR19x9pnBqOZF24Rk8cZnq7nK2EJ5vJ2D3Oy4lGqb/GMGO2bXSONd4wQaDg3qx iAMr6alrRXZrvWiJV1MWeHEgu3F4DQpDKhBCZXHqjhIA+/50I5OiPctYbzwtp1X91DNQ Wvh3hh3nSR94Gdox9N8th7f+51kN2m5jdDCgs38qKTD3c1izwRhestOp0y8bb/gSV98S bP4QOCC9tAZlrfhxiSnUVLVwDRIuYrYnop+c5bPpunUQSlRZK1/3qtvSbYITsFidvdJZ nFKwWb05EYJtmlOLYubobfYslNrVk63CqvThokVqGQRJqokrnG7B4WHia6roRtPas/ld 9Ktg== X-Gm-Message-State: AOJu0Yycvu9oZewsnBQIjDaQzxh/34uPraVpJzM2jIxVXonfKEq8IArO FFqQDLcwbyBwYmDATfl+eLAAFoWX9BLUnt0blEYiuQ== X-Received: by 2002:a5d:58c2:0:b0:321:f74d:ade6 with SMTP id o2-20020a5d58c2000000b00321f74dade6mr11933643wrf.40.1696316699144; Tue, 03 Oct 2023 00:04:59 -0700 (PDT) Received: from m1x-phil.lan (176-131-222-246.abo.bbox.fr. [176.131.222.246]) by smtp.gmail.com with ESMTPSA id d18-20020a056000115200b00326c952716esm818614wrx.61.2023.10.03.00.04.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Oct 2023 00:04:58 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Daniel Henrique Barboza , David Gibson , Paolo Bonzini , kvm@vger.kernel.org, Richard Henderson , =?utf-8?q?C=C3=A9dric_Le_?= =?utf-8?q?Goater?= , qemu-ppc@nongnu.org, Kevin Wolf , Daniel Henrique Barboza , Michael Tokarev , Greg Kurz , Nicholas Piggin , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 4/4] target/ppc: Prohibit target specific KVM prototypes on user emulation Date: Tue, 3 Oct 2023 09:04:26 +0200 Message-ID: <20231003070427.69621-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231003070427.69621-1-philmd@linaro.org> References: <20231003070427.69621-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 None of these target-specific prototypes should be used by user emulation. Remove their declaration there, so we get a compile failure if ever used (instead of having to deal with linker and its possible optimizations, such dead code removal). Suggested-by: Kevin Wolf Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza --- target/ppc/kvm_ppc.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h index 6a4dd9c560..1975fb5ee6 100644 --- a/target/ppc/kvm_ppc.h +++ b/target/ppc/kvm_ppc.h @@ -13,6 +13,10 @@ #include "exec/hwaddr.h" #include "cpu.h" +#ifdef CONFIG_USER_ONLY +#error Cannot include kvm_ppc.h from user emulation +#endif + #ifdef CONFIG_KVM uint32_t kvmppc_get_tbfreq(void);