From patchwork Wed Apr 5 16:04:45 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: 670317 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp363560wrt; Wed, 5 Apr 2023 09:06:26 -0700 (PDT) X-Google-Smtp-Source: AKy350bJdsQidqH3NeoB2LEeDmNA8cMlF3bD8Bk7D5ERSWclcns49iWLgG8Fzf7iKivc0kWJkByJ X-Received: by 2002:ac8:5b8f:0:b0:3e4:f002:2b53 with SMTP id a15-20020ac85b8f000000b003e4f0022b53mr7066440qta.40.1680710786228; Wed, 05 Apr 2023 09:06:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680710786; cv=none; d=google.com; s=arc-20160816; b=ixPWABwN0eCyOZGymWN7b3z75jxe7/bi4o4dVa5foenmklizYuRIgfM2V0McYBwwE7 dqoZmLgfk4I0eKYZjIkEhWifWAT5aykfqLPN2RWuuzP4q0Ez9T+DgGfvIsY9WNogoahL iR5vZChTwqaUPj8Ls5seoyIHcsN6ZSUVzs5huitoVC6rdLQvqJYVWBPtH+Mkk6+3cfHa 1dqm1QxtFZoMbJ0RKFrMYCI0ZoOxu8x8uY1JBv7VXuy7gfw4mR1i3Q92OClQwCBLAw7G jnn328WFTKVWuL+66g0UWN2PFwyHe6pMhgID+umH3wACKSkUBr+L9NXOdwQxZPYcQKaB DZsQ== 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=xxoSzGepGv7BmEwhIUriUkTSi2iiaajTQsAiWFvibwk=; b=qyR/zBeUIe+56Lq92SmKhcuAT4xjC0Zn2M0QhlWpOYUXvgHEqggNuwoJHyTxFh2YjS qoh54ILgN71AcvSIhi7eQmA2ac8bljIB//ZIcdED6yGm2xGQAYHYOrJTBttsRqZ4OnXj vj5VMwlShT/RUHA1hgcnFdBLfXxqH34pY8JDhTa1Hp70EZQ+uM6Ura1bAPPzTg8SITtT MIjYJkcBstrvDn9gWa86JSHCDKjFM0ig4kJrozxCfZbo/uqwLSTu56pxKnEFPNrSHh8b gsU4+BEFljM6ZMovZBbzy/T0lMf7v2vcdkgciHS/aVsCXuqkIFfmi+hzAygMmIdjbsd2 YIDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DQmQx5Ib; 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 j2-20020ac85f82000000b003b644b7e22bsi9962808qta.155.2023.04.05.09.06.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Apr 2023 09:06:26 -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=DQmQx5Ib; 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 1pk5dJ-0005uV-5p; Wed, 05 Apr 2023 12:05:13 -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 1pk5dD-0005s8-87 for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:05:07 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pk5dB-0007gj-6p for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:05:06 -0400 Received: by mail-wr1-x435.google.com with SMTP id h17so36703010wrt.8 for ; Wed, 05 Apr 2023 09:05:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680710703; 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=xxoSzGepGv7BmEwhIUriUkTSi2iiaajTQsAiWFvibwk=; b=DQmQx5IbN6E4g6+BkWxA6gztVY7c/sHCIzd5stHTLyHiWOEkRlEtrivX3vqbDbGjL7 XxhqdFKDllanEdiwIR+2geFMKUEf51/bjTU6C1eN4FPCiqJiX82RtiNDDdUc4v8TZMlS hfE9xJx7iUvpEr/MKnWta3hPHTH4tZxYVjBbZjbRVHV9SQjjE7MOqQkE5Vx8Ki+X5wTp c5TkfIiumSxeeb7KERAMfNwXTLH281hiqor5R3BeKHaP0CWh9xqCJFkqSyE1Ryn0CRfG Wa9APsQXMmO/K9sEl+9/eYdh12Me4fUTC8mQAdjssj9vMZeCKSBjNoCuzIYv3M364S11 1Z3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680710703; 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=xxoSzGepGv7BmEwhIUriUkTSi2iiaajTQsAiWFvibwk=; b=P02xa/ZERcrmfDIQ98ZXjR6047aH3rXYaKfltAgHGb62qd3eARMNElFECRoG363/D/ g9Ms9qo3FZr75k04+H/84yrT/GG2Qc6ErWdFZ4FreTtRIuYxtEf6I9JuQRMirkGxod71 bO6lNY16FPDGJ5Cjll6vcoe9gl9JtvvXDl2DskKfl9L4x+OMOh4QNdeBO2a41CWhVCx0 DoboeH+Gls5wrBgjF/sDtTVPsWQRTEwBT/OymIdcf4YT830YlSg2aBOxU5ZtAze1FoY7 8O6lGKZbaq+rouTxMdMghxPkFBbDfKDT6gGPsPLYkuMSUpvpsptju7KA8y2mCDhDyV1j Jo9A== X-Gm-Message-State: AAQBX9dzisT8eUG6YTQINRWNMhn2uVzTKWfYYFZ9w5/HGKlZcW1ZBJUF 8xSBH7vucxgRiGEFw3cQE1T68pGoXWtTabwOxBk= X-Received: by 2002:adf:de8f:0:b0:2dc:c0da:409 with SMTP id w15-20020adfde8f000000b002dcc0da0409mr3979004wrl.27.1680710703263; Wed, 05 Apr 2023 09:05:03 -0700 (PDT) Received: from localhost.localdomain (4ab54-h01-176-184-52-81.dsl.sta.abo.bbox.fr. [176.184.52.81]) by smtp.gmail.com with ESMTPSA id k16-20020a056000005000b002e116cbe24esm15293404wrx.32.2023.04.05.09.05.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 05 Apr 2023 09:05:02 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, qemu-riscv@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, kvm@vger.kernel.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Paolo Bonzini Subject: [PATCH 01/10] sysemu/kvm: Remove unused headers Date: Wed, 5 Apr 2023 18:04:45 +0200 Message-Id: <20230405160454.97436-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230405160454.97436-1-philmd@linaro.org> References: <20230405160454.97436-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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 All types used are forward-declared in "qemu/typedefs.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson --- include/sysemu/kvm.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index cc6c678ed8..7902acdfd9 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -16,9 +16,6 @@ #ifndef QEMU_KVM_H #define QEMU_KVM_H -#include "qemu/queue.h" -#include "hw/core/cpu.h" -#include "exec/memattrs.h" #include "qemu/accel.h" #include "qom/object.h" From patchwork Wed Apr 5 16:04:46 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: 670320 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp364049wrt; Wed, 5 Apr 2023 09:07:03 -0700 (PDT) X-Google-Smtp-Source: AKy350a2CixHKiIQHk+2I9DuZxpQxclVLGH82R54uPIh6EPRHf5PFqIlcIjq3nLpfjoPBnSpDOdr X-Received: by 2002:a05:622a:649:b0:3e6:5141:e7ea with SMTP id a9-20020a05622a064900b003e65141e7eamr4952366qtb.47.1680710823736; Wed, 05 Apr 2023 09:07:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680710823; cv=none; d=google.com; s=arc-20160816; b=e5oGjH9g6g6FcS9Nu0sPtIdG1nGb2mtliV3NqYAsFoGM9BQ+u8ScBJL2OHNirMfPsn 0JHZ6tPmoGlPgk/yXGZhDgB/ZHQmXWAsVCj2D9q0Ez+dF1d5mPBSSA4zi1anI6mHmIBK Xodqxl231i91OmbR1iwI8gK+ZNkG7OdDETdr0SZQKdElPl7QlZ+5NEjnEz8DieTyRsjB kWdUxSdLAq2yWEdLDkW9jes3VjiEpyYbfVyzLIXgfpBC6Y2lslVE3orhooGjq83minHU lDQR0e912YVR11sym8Bn0uZUm2NKzJlI/dp5sCH7fsee9WRMsUdlUzoUzDNFKu41B1fi GtDw== 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=vR5kvRphrC8o/hHrAZxx+p2NR9QjIUYlt0J+xt0JrLs=; b=iyosIo2CoK15zxcblFs91UbkNkFH5mqYpJkqeGP4aY6b3nvkWaf17AidpjtAgbVWbA jsKug6xMtf48uBrsSZMJVrdHUC561oD8W1LpLX4m6ibyu7NDC4wsRAdWJrQzfFzoH01M VTy55Mv4tpf/ZlbamIdlhUlYDyGlcUVWaQiGI6FrgbPbP9N+Oi90MEGMZbLFa004OHq5 x3Fz/h9mm6DfkUwjHp6oNCwmxCvOgQGvcWodWxB/b+1Ut/dmOX6NHqJHQyPxy0LB6VJO 8Bq/HvL826pS+RfwON2xLSLHuAyOXgN+LjJYdbI5rhEC936ZdrBlU0EBeIixj3Xphl4z 8ZxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Kue5crNs; 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 v15-20020a05622a188f00b003e4da8a50a9si10165506qtc.372.2023.04.05.09.07.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Apr 2023 09:07:03 -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=Kue5crNs; 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 1pk5dL-0005vT-6W; Wed, 05 Apr 2023 12:05:15 -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 1pk5dK-0005up-8v for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:05:14 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pk5dH-0007lh-KX for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:05:14 -0400 Received: by mail-wm1-x336.google.com with SMTP id s13so21172029wmr.4 for ; Wed, 05 Apr 2023 09:05:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680710709; 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=vR5kvRphrC8o/hHrAZxx+p2NR9QjIUYlt0J+xt0JrLs=; b=Kue5crNsn30pNOYpY9SPsIZwYEzatKWT1JwNyC4Tz7AI+Dm1LFg9LUQzgpf2K6tikc mk/JLoWJuJW2YMb/u8tpJRDDD7NE7oEZWhjMD1NIUNYPSkllpMt4dfkpHFl4mXkmb2/c TNeHcs9kjwshAlFLaAd4rINe8sxW9leo230jyONFwRebI56QBZwVXxxrhO9P73poHXtK Y8QJ/YWtGqiDl6UF/8eCPHY7/WUX9shWQCd5AGt9lFkl2TKo5jGKRk9cKJNCtgCpeGep 9jtSe7h0htiRpqIt8S8VefTo70S/iyC9ehr9mAsFxriP5352D4IpRYJpO5PNI1YHwluK zLVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680710709; 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=vR5kvRphrC8o/hHrAZxx+p2NR9QjIUYlt0J+xt0JrLs=; b=bAPJJqT0jK6Xj0CAAM5ESBNBxJIV+4dsHUfiFaBg/RW/+1vX+/DRLiexcF3ZAxiVAM 88vnRgkEnakrXBVr7G3d8hAPlvp9FBaa98xa41sUPuWjff10VoDMsIcQkiVI94qW2IUF bsyAUs/NkmsSmCabLBJGxmKV/HffG7GU2m00biusQmB9ZInT8mwMJFYU3/tiD+exFY7g tY0LvmDfSkkCNia+L/GGxWMF6zF3aM0tdJ/VINXSg298ATYrLc3pePChMyeTRaY5XEE1 e2pQCiSbgBCIHTVJc64ZxpEw84xjC36ISf0womhSrk4FTKatJntWrBgQBZ/dM4lcjQ60 0otA== X-Gm-Message-State: AAQBX9cGFev6GO8U9gLyP59ITGxuC2XfSKvQMl8fZwnjA2iz+2rmWW3t dZ7KgRxWWH7U1wiQk1jhEl1WcQwBz5d34OYLShc= X-Received: by 2002:a7b:c7d4:0:b0:3ed:809b:79ac with SMTP id z20-20020a7bc7d4000000b003ed809b79acmr5056954wmk.19.1680710709383; Wed, 05 Apr 2023 09:05:09 -0700 (PDT) Received: from localhost.localdomain (4ab54-h01-176-184-52-81.dsl.sta.abo.bbox.fr. [176.184.52.81]) by smtp.gmail.com with ESMTPSA id t6-20020a05600c450600b003ee2a0d49dbsm2642061wmo.25.2023.04.05.09.05.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 05 Apr 2023 09:05:08 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, qemu-riscv@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, kvm@vger.kernel.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Paolo Bonzini Subject: [PATCH 02/10] accel/kvm: Declare kvm_direct_msi_allowed in stubs Date: Wed, 5 Apr 2023 18:04:46 +0200 Message-Id: <20230405160454.97436-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230405160454.97436-1-philmd@linaro.org> References: <20230405160454.97436-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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 Avoid when calling kvm_direct_msi_enabled() from arm_gicv3_its_common.c the next commit: Undefined symbols for architecture arm64: "_kvm_direct_msi_allowed", referenced from: _its_class_name in hw_intc_arm_gicv3_its_common.c.o ld: symbol(s) not found for architecture arm64 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson --- accel/stubs/kvm-stub.c | 1 + 1 file changed, 1 insertion(+) diff --git a/accel/stubs/kvm-stub.c b/accel/stubs/kvm-stub.c index 5d2dd8f351..235dc661bc 100644 --- a/accel/stubs/kvm-stub.c +++ b/accel/stubs/kvm-stub.c @@ -27,6 +27,7 @@ bool kvm_allowed; bool kvm_readonly_mem_allowed; bool kvm_ioeventfd_any_length_allowed; bool kvm_msi_use_devid; +bool kvm_direct_msi_allowed; void kvm_flush_coalesced_mmio_buffer(void) { From patchwork Wed Apr 5 16:04:47 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: 670322 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp364081wrt; Wed, 5 Apr 2023 09:07:05 -0700 (PDT) X-Google-Smtp-Source: AKy350ZCn7W8xTEZ6BhDG2JEqXqCKYrMOnCzsnZihmjvTkRWn50wGx5abYOgDweeO+7wubZakb3n X-Received: by 2002:a05:6214:238b:b0:577:5ffe:e0c3 with SMTP id fw11-20020a056214238b00b005775ffee0c3mr10351932qvb.16.1680710825309; Wed, 05 Apr 2023 09:07:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680710825; cv=none; d=google.com; s=arc-20160816; b=obEbF8wRehVq7dA5W/l3fjqOURmJ2ZxvjksseRn/6Nu6NJZGZwyewdqbwE6zYhMpBz mwzxBLVPyFrPUBiTLU1MSV51Fs6gVaVnFkmTHiMML+oLzytva/1qOO9eYf6qaPaO33ia GxtAQLvk/mrFtVhfWpDenj6IvmoErHGl0GLvc+vH+IG0CfiGMR2WJZ8RunNolAQ4jUtp ptvj5F9fD2cvQla+KLO1icFS+7raYZq/YUC+JFSONO5A7Ve0lhvSgi/+P8cBubJZ/kTu fx4H+SVLt6hR12HEQf/MYteSQfok9AphAQjgdN/Y55KUFQMQSSqwCU6WuTSywlNH8V32 rcVg== 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=vqJcKhz9mIYMr3Oe650mCrgDSoO6+Z+db2hud5uttJw=; b=i15+fGPaIS+hrNSWyp29wIv4sDKtbCWd/MQ2ZTxoHEg07U5K1aoRbQMgSzu1cl/6q0 mMJ/aFd2xzey0dCrioJa1GuFdqW0jdHKpw432wEvOsM7Iv/TT2lYg116qBlQpO1Cnga6 nuyX0eVwDyf8r5fZsYpAd0EkEPR+ZBIq5qOfumGmC2u8RQfvzzUpNrB/XyAciQeVZN2s 9AwyVJTi0PFNx7YHnmPpsmVJoXlDOwMdJeLufwe+SkFldlDGEhfWOu/Dn2NX9yoCh/kn KGtwVHCZ5RLCtoMd+YHE3lkFpYI3vTkSYnq0tJ2aVPpU5amgGkBEC1IL5I2p0jdDvkQR F/xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HKwM2wDJ; 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 ib13-20020a0562141c8d00b005b153706580si7324867qvb.429.2023.04.05.09.07.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Apr 2023 09:07:05 -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=HKwM2wDJ; 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 1pk5dR-0005yi-0D; Wed, 05 Apr 2023 12:05:21 -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 1pk5dQ-0005xm-0b for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:05:20 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pk5dM-0007XC-FU for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:05:19 -0400 Received: by mail-wr1-x42e.google.com with SMTP id q19so33656565wrc.5 for ; Wed, 05 Apr 2023 09:05:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680710715; 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=vqJcKhz9mIYMr3Oe650mCrgDSoO6+Z+db2hud5uttJw=; b=HKwM2wDJ1Fum+wqlFpT+ZGNsBPp7MH24wgkXSJwjBKyOE+4yhIpILKEyyjMZxMmiAD DXttce9/UlXfCDXhUY0vpealipGUCFqdh25CESoprzd/G49n7qbtXRObflz9tqSuM1F7 NhEOtd7ocMwbq0oWvCtYAuvh91yLbGhXLXvZ0H3VeVIegPm2GRaXQd0+P7USRVczo9wH OkkavqtWMbctyFZouKLoRT8V4s8VzYy1hTwtmR5fLXDvRCDvderEBMd29GlxvpY9KDh3 HoKoGgz26of/gomablGIAqTVkdsvIcrHjzIM7huMgI0NyHKBbCcGxfoW5vbe7ROmPTjn Ht6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680710715; 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=vqJcKhz9mIYMr3Oe650mCrgDSoO6+Z+db2hud5uttJw=; b=aAaMabauz+D6sehjwYWSqqd6a8Hz8uowG51UszOhesiROBNo4XoxF+bBw3OEK7h1TF eil4aqf95rlGYPXiwIoQQNfHQB6EhLpL9FmQ2j2Os0AH/vISoFvd5q1zkTe3UQZdxuwx grLeTZNt7v713yAuKCs+2Lu8yoZKXwBou0eimwL5DgXEfUT5Lpo+I/sMm64LDnfpv2mO XgN8tXyqdj8BAIf3yCxxDKVGOZDrMNJIWVdM/yRGr1lcY8QIjGgClODTGSyVKU6FT3Bk VNCLfCT7WW6QH2+06axPU/ITph1daOyS7c0Zbkbhr6JZxTKhEOeJ8jtzz3dAemLjWmSq ydtg== X-Gm-Message-State: AAQBX9eWdikxz9xDnhPD7akfatoN2EWcMuYre7TJuYZu7mgqJwv8LZ5I xisnEVXMFDThWq2hPlLvL9ViRWXEL/zN5AJrzIM= X-Received: by 2002:adf:cd05:0:b0:2cf:e34c:a229 with SMTP id w5-20020adfcd05000000b002cfe34ca229mr4808855wrm.8.1680710715354; Wed, 05 Apr 2023 09:05:15 -0700 (PDT) Received: from localhost.localdomain (4ab54-h01-176-184-52-81.dsl.sta.abo.bbox.fr. [176.184.52.81]) by smtp.gmail.com with ESMTPSA id e38-20020a5d5966000000b002d78a96cf5fsm15467280wri.70.2023.04.05.09.05.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 05 Apr 2023 09:05:15 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, qemu-riscv@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, kvm@vger.kernel.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Peter Maydell , Shannon Zhao , "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha , Paolo Bonzini Subject: [PATCH 03/10] hw/intc/arm_gic: Un-inline GIC*/ITS class_name() helpers Date: Wed, 5 Apr 2023 18:04:47 +0200 Message-Id: <20230405160454.97436-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230405160454.97436-1-philmd@linaro.org> References: <20230405160454.97436-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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 "kvm_arm.h" contains external and internal prototype declarations. Files under the hw/ directory should only access the KVM external API. In order to avoid machine / device models to include "kvm_arm.h" simply to get the QOM GIC/ITS class name, un-inline each class name getter to the proper device model file. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/hw/intc/arm_gic.h | 2 ++ include/hw/intc/arm_gicv3_common.h | 10 ++++++ include/hw/intc/arm_gicv3_its_common.h | 9 ++++++ target/arm/kvm_arm.h | 45 -------------------------- hw/arm/virt-acpi-build.c | 2 +- hw/arm/virt.c | 1 + hw/intc/arm_gic_common.c | 7 ++++ hw/intc/arm_gicv3_common.c | 14 ++++++++ hw/intc/arm_gicv3_its_common.c | 12 +++++++ 9 files changed, 56 insertions(+), 46 deletions(-) diff --git a/include/hw/intc/arm_gic.h b/include/hw/intc/arm_gic.h index 116ccbb5a9..48f6a51a70 100644 --- a/include/hw/intc/arm_gic.h +++ b/include/hw/intc/arm_gic.h @@ -86,4 +86,6 @@ struct ARMGICClass { DeviceRealize parent_realize; }; +const char *gic_class_name(void); + #endif diff --git a/include/hw/intc/arm_gicv3_common.h b/include/hw/intc/arm_gicv3_common.h index ab5182a28a..4e2fb518e7 100644 --- a/include/hw/intc/arm_gicv3_common.h +++ b/include/hw/intc/arm_gicv3_common.h @@ -329,4 +329,14 @@ struct ARMGICv3CommonClass { void gicv3_init_irqs_and_mmio(GICv3State *s, qemu_irq_handler handler, const MemoryRegionOps *ops); +/** + * gicv3_class_name + * + * Return name of GICv3 class to use depending on whether KVM acceleration is + * in use. May throw an error if the chosen implementation is not available. + * + * Returns: class name to use + */ +const char *gicv3_class_name(void); + #endif diff --git a/include/hw/intc/arm_gicv3_its_common.h b/include/hw/intc/arm_gicv3_its_common.h index a11a0f6654..7dc712b38d 100644 --- a/include/hw/intc/arm_gicv3_its_common.h +++ b/include/hw/intc/arm_gicv3_its_common.h @@ -122,5 +122,14 @@ struct GICv3ITSCommonClass { void (*post_load)(GICv3ITSState *s); }; +/** + * its_class_name: + * + * Return the ITS class name to use depending on whether KVM acceleration + * and KVM CAP_SIGNAL_MSI are supported + * + * Returns: class name to use or NULL + */ +const char *its_class_name(void); #endif diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h index 99017b635c..fe6d824a52 100644 --- a/target/arm/kvm_arm.h +++ b/target/arm/kvm_arm.h @@ -445,32 +445,6 @@ static inline uint32_t kvm_arm_sve_get_vls(CPUState *cs) #endif -static inline const char *gic_class_name(void) -{ - return kvm_irqchip_in_kernel() ? "kvm-arm-gic" : "arm_gic"; -} - -/** - * gicv3_class_name - * - * Return name of GICv3 class to use depending on whether KVM acceleration is - * in use. May throw an error if the chosen implementation is not available. - * - * Returns: class name to use - */ -static inline const char *gicv3_class_name(void) -{ - if (kvm_irqchip_in_kernel()) { - return "kvm-arm-gicv3"; - } else { - if (kvm_enabled()) { - error_report("Userspace GICv3 is not supported with KVM"); - exit(1); - } - return "arm-gicv3"; - } -} - /** * kvm_arm_handle_debug: * @cs: CPUState @@ -508,23 +482,4 @@ void kvm_arm_copy_hw_debug_data(struct kvm_guest_debug_arch *ptr); */ bool kvm_arm_verify_ext_dabt_pending(CPUState *cs); -/** - * its_class_name: - * - * Return the ITS class name to use depending on whether KVM acceleration - * and KVM CAP_SIGNAL_MSI are supported - * - * Returns: class name to use or NULL - */ -static inline const char *its_class_name(void) -{ - if (kvm_irqchip_in_kernel()) { - /* KVM implementation requires this capability */ - return kvm_direct_msi_enabled() ? "arm-its-kvm" : NULL; - } else { - /* Software emulation based model */ - return "arm-gicv3-its"; - } -} - #endif diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 4156111d49..e8bab19847 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -48,12 +48,12 @@ #include "hw/pci/pci_bus.h" #include "hw/pci-host/gpex.h" #include "hw/arm/virt.h" +#include "hw/intc/arm_gicv3_its_common.h" #include "hw/mem/nvdimm.h" #include "hw/platform-bus.h" #include "sysemu/numa.h" #include "sysemu/reset.h" #include "sysemu/tpm.h" -#include "kvm_arm.h" #include "migration/vmstate.h" #include "hw/acpi/ghes.h" #include "hw/acpi/viot.h" diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 1fe39c6683..dbbe639e61 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -63,6 +63,7 @@ #include "hw/arm/fdt.h" #include "hw/intc/arm_gic.h" #include "hw/intc/arm_gicv3_common.h" +#include "hw/intc/arm_gicv3_its_common.h" #include "hw/irq.h" #include "kvm_arm.h" #include "hw/firmware/smbios.h" diff --git a/hw/intc/arm_gic_common.c b/hw/intc/arm_gic_common.c index a379cea395..9702197856 100644 --- a/hw/intc/arm_gic_common.c +++ b/hw/intc/arm_gic_common.c @@ -21,10 +21,12 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/module.h" +#include "qemu/error-report.h" #include "gic_internal.h" #include "hw/arm/linux-boot-if.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" +#include "sysemu/kvm.h" static int gic_pre_save(void *opaque) { @@ -393,3 +395,8 @@ static void register_types(void) } type_init(register_types) + +const char *gic_class_name(void) +{ + return kvm_irqchip_in_kernel() ? "kvm-arm-gic" : "arm_gic"; +} diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c index 642a8243ed..2ebf880ead 100644 --- a/hw/intc/arm_gicv3_common.c +++ b/hw/intc/arm_gicv3_common.c @@ -24,6 +24,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/module.h" +#include "qemu/error-report.h" #include "hw/core/cpu.h" #include "hw/intc/arm_gicv3_common.h" #include "hw/qdev-properties.h" @@ -608,3 +609,16 @@ static void register_types(void) } type_init(register_types) + +const char *gicv3_class_name(void) +{ + if (kvm_irqchip_in_kernel()) { + return "kvm-arm-gicv3"; + } else { + if (kvm_enabled()) { + error_report("Userspace GICv3 is not supported with KVM"); + exit(1); + } + return "arm-gicv3"; + } +} diff --git a/hw/intc/arm_gicv3_its_common.c b/hw/intc/arm_gicv3_its_common.c index d7532a7a89..abaf77057e 100644 --- a/hw/intc/arm_gicv3_its_common.c +++ b/hw/intc/arm_gicv3_its_common.c @@ -24,6 +24,7 @@ #include "hw/intc/arm_gicv3_its_common.h" #include "qemu/log.h" #include "qemu/module.h" +#include "sysemu/kvm.h" static int gicv3_its_pre_save(void *opaque) { @@ -158,3 +159,14 @@ static void gicv3_its_common_register_types(void) } type_init(gicv3_its_common_register_types) + +const char *its_class_name(void) +{ + if (kvm_irqchip_in_kernel()) { + /* KVM implementation requires this capability */ + return kvm_direct_msi_enabled() ? "arm-its-kvm" : NULL; + } else { + /* Software emulation based model */ + return "arm-gicv3-its"; + } +} From patchwork Wed Apr 5 16:04:48 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: 670324 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp364536wrt; Wed, 5 Apr 2023 09:07:42 -0700 (PDT) X-Google-Smtp-Source: AKy350acfCzcAB2ZnLgXG+ofHVVqfxps5yAvVPaWqVWSfSd+ENXmECOsrCMg+1EOk8ZmQpoz1qgG X-Received: by 2002:a05:622a:1487:b0:3d5:500a:4809 with SMTP id t7-20020a05622a148700b003d5500a4809mr6100631qtx.26.1680710862141; Wed, 05 Apr 2023 09:07:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680710862; cv=none; d=google.com; s=arc-20160816; b=ODV5OwyEuSM7uRBZN7kGTJCABdarHE/XEYyTeRgHtTxbKAEj66EqfPgKpq5W7O+T2x 1Omp0gbf+L/eSidik2ktnQJH0axoF7O87ZQVgg+Mp37g9kp8ryy+iW60/5z6UAfrRWQ+ EQbNR1d/DW6xCV93TpW+dup8TsgbZkc5GtAVFYd+EnRPWkODJdeZtglmxzX22VChDxY3 6dMupFHvsuZP5IlXiDkw/MfmiZ77MgliZgbhB7NXG/uztzD+pzQLHJZOMlPNUQ7Btl/I brQjsgrfofbmgJJ1wuDs7RY9XpYTOGcDfhrz+9QCydes6uSbP8ZHhrh28Bprev2n+MMs wR4Q== 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=5CSHrPIDjf1IWIN1nnp6I0uB6O25vizWYPyXq8gYKvo=; b=jl7N/VFEFvpKnoCmrMsYZConu/fzx6+sEJ7cKdnoqROI6cGTYL6juH/j0VED3JU8iB WNySbI/rvvpRzrflXtxTkh3D7khngH0BulKDy9ljr1yyzasn+o9EboxAHlDEXJweftC3 ojCx5s6UoThrnd/prIzlsVuqG2g6EubH5wH4dnnHrJQkEWm+8RATSTrEp8RQSsO2rdIq d8aJ1kLA9fd8A2LfZFo69dqd2kF4sImET0iDwH2yqLeDoHuGFFhd/Z5cbkZDUTkYkMLs wqDbf5JxINQ6QUvAlIsAUhZyv5DUZ6YJThIBI6CcY/AX/xeieqZLKAks8fSFy6jlOPrX VsQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=G6pPxv8m; 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 y17-20020a05622a121100b003b817bafcb1si9809150qtx.770.2023.04.05.09.07.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Apr 2023 09:07:42 -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=G6pPxv8m; 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 1pk5dV-00060h-UH; Wed, 05 Apr 2023 12:05:25 -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 1pk5dU-000604-NN for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:05:24 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pk5dS-0007pj-NA for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:05:24 -0400 Received: by mail-wm1-x32d.google.com with SMTP id m8so10284870wmq.5 for ; Wed, 05 Apr 2023 09:05:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680710721; 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=5CSHrPIDjf1IWIN1nnp6I0uB6O25vizWYPyXq8gYKvo=; b=G6pPxv8mxmBXT/A7Fms6p48gVBPAVhCbwwptPPupZJfFBxICRxzF5EfjLYHeeUdIOM KuTVNoN2hg8Z3US/l5DXZyRgclnPh2Svov5K5NTEkQxYcjBSczhbLwslailyhLzmv6Hx 91gp8FcyA1tMzQYLGb0/U7BSEeLNYMUXaL3U64SUPUMVKewIvfK4P2ZczU3Eu+z/zV/O nTNCHqofXowPBxAA4rcW8XP7R0rJ7wuGTOYWFborUVJW0xF27yen/vXwymcuMP8cWAbJ k89Nl96lVK8m1OUz0Xtgy2IppNpCw1q/fBG9RE/e5WdoX3T9mSBBSUEfBaVAMGEYLdkN N91w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680710721; 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=5CSHrPIDjf1IWIN1nnp6I0uB6O25vizWYPyXq8gYKvo=; b=hawy89PYY5y+EwVd4v6fLIsqGY3IL/+k2EhBYCyKWPtRhUekaQCXzJ86/mWRLUuK4l 8ciYwc/Ubycw4mcvRO+G+FRvUjohxBMS1TXef/qGSq9UX2XvtzULX0LItXTIh3Y2LfS3 Iscl918/ojhjPjZzKJwyYHApfJt3Z227QytpuARICUJkw1z7ygTHVd4BTqafmTjU/r8/ xLdF+T8INAP7Rpe8yaGq15RPqqvODcKDyaprWV572+r/L7OA6I3ZDGeDbtr2a3C30yMX MZkf5HhFwgfH597T65LKwwXAtYgzZpEn8vo7QVq6FfCr5bp73fizd/3ZMHlLkRbsWZv4 zyaw== X-Gm-Message-State: AAQBX9fIReBxnhWGs0WK9svZHmr2llAwzGR3q0HMsq3r4mYeUtHjrmum bwqoTHAaFx6ia+feIzve9acKHScqVaXpqZq+SYA= X-Received: by 2002:a7b:c4ca:0:b0:3ed:e5db:52e1 with SMTP id g10-20020a7bc4ca000000b003ede5db52e1mr5471510wmk.15.1680710721116; Wed, 05 Apr 2023 09:05:21 -0700 (PDT) Received: from localhost.localdomain (4ab54-h01-176-184-52-81.dsl.sta.abo.bbox.fr. [176.184.52.81]) by smtp.gmail.com with ESMTPSA id r15-20020a05600c458f00b003f03d483966sm2662576wmo.44.2023.04.05.09.05.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 05 Apr 2023 09:05:20 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, qemu-riscv@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, kvm@vger.kernel.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Peter Maydell Subject: [PATCH 04/10] hw/intc/arm_gic: Rename 'first_cpu' argument Date: Wed, 5 Apr 2023 18:04:48 +0200 Message-Id: <20230405160454.97436-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230405160454.97436-1-philmd@linaro.org> References: <20230405160454.97436-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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 "hw/core/cpu.h" defines 'first_cpu' as QTAILQ_FIRST_RCU(&cpus). arm_gic_common_reset_irq_state() calls its second argument 'first_cpu', producing a build failure when "hw/core/cpu.h" is included: hw/intc/arm_gic_common.c:238:68: warning: omitting the parameter name in a function definition is a C2x extension [-Wc2x-extensions] static inline void arm_gic_common_reset_irq_state(GICState *s, int first_cpu, ^ include/hw/core/cpu.h:451:26: note: expanded from macro 'first_cpu' #define first_cpu QTAILQ_FIRST_RCU(&cpus) ^ KISS, rename the function argument. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- hw/intc/arm_gic_common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/intc/arm_gic_common.c b/hw/intc/arm_gic_common.c index 9702197856..889327a8cf 100644 --- a/hw/intc/arm_gic_common.c +++ b/hw/intc/arm_gic_common.c @@ -235,12 +235,13 @@ static void arm_gic_common_realize(DeviceState *dev, Error **errp) } } -static inline void arm_gic_common_reset_irq_state(GICState *s, int first_cpu, +static inline void arm_gic_common_reset_irq_state(GICState *s, + int first_cpu_index, int resetprio) { int i, j; - for (i = first_cpu; i < first_cpu + s->num_cpu; i++) { + for (i = first_cpu_index; i < first_cpu_index + s->num_cpu; i++) { if (s->revision == REV_11MPCORE) { s->priority_mask[i] = 0xf0; } else { From patchwork Wed Apr 5 16:04:49 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: 670323 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp364153wrt; Wed, 5 Apr 2023 09:07:09 -0700 (PDT) X-Google-Smtp-Source: AKy350ZsMB0W7XssWRVCauamI5nbG6jk1jzR/sR4hxeGIm84INOL0SwUzorde5XfknWGfzR+36aU X-Received: by 2002:ac8:4e88:0:b0:3b9:bf83:d5de with SMTP id 8-20020ac84e88000000b003b9bf83d5demr5692263qtp.26.1680710829717; Wed, 05 Apr 2023 09:07:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680710829; cv=none; d=google.com; s=arc-20160816; b=TKTWlhMjK7sOGo/2KXqCDbVWrcgJ8hXFwaj9GVUwHQ7U4shsAnDxF4CcSxNFYQ6HvX dICHnV2xIbDwqXVZ+qOT4NM7rk2AYZsr5VFp6H1GkOB+25lNcqRmOGs+QTar8LtiyDG9 cdCK7EtoyKtv2iSTXYtjYPgZQ+1PbYdbol46MlCt/JaB94Kvx2LhuvQvh4BOnaHj/E+p sqyLqqfngvcC2W+N38/nnDMOuem8Je33k6asxmcep4InyZjUCb2OTey6h+zQqrzSly+p kNWS9c6nsFHPwJB3Dok3cg/srf4csjnl5IFB3qrRunFbJM4GjHu9FJAXIkJ46tvLv+rw Rr5Q== 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=z2hst+C2Hubq09FNgBe92GHruUqjFSuaPIAbKjAIoI8=; b=PLAlZKZyMcX4G8mCRJ4meJRr8D919HTLoQo/oGnqNBlbHVfNjsgImXXI5cka8iYDct W8sKVK5yMBhx3InT7H8bfuvyETo8aC1pOA1l4wdxiZqMSWleACx6tX+KdBhx4htZco0Y jD+m64F/t21n3HU6+AcPrVrQAKrBg9wThcR//9wag9Acwsi8yYFaBPhrstkW85CLcaCC mNGbgLB8H6MCKRH6WC+wNQl/cAgpuPwWzkr4xJTfICGIHDxLEaS4d286G6/1ukyxYDHS GtuaWdDUerFEdYjmGE7pZ6+dXS4LbVLhLKtuBWTrq8zIwvBcxnPG++DyyyOFqaG5rsTL yUcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hnCYq5Dz; 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 bl11-20020a05620a1a8b00b0074860f49e1fsi10599165qkb.685.2023.04.05.09.07.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Apr 2023 09:07:09 -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=hnCYq5Dz; 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 1pk5dn-0006F8-Vd; Wed, 05 Apr 2023 12:05: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 1pk5db-00063q-5r for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:05:32 -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 1pk5dX-0007lc-SW for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:05:30 -0400 Received: by mail-wm1-x329.google.com with SMTP id he13so1573634wmb.2 for ; Wed, 05 Apr 2023 09:05:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680710727; 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=z2hst+C2Hubq09FNgBe92GHruUqjFSuaPIAbKjAIoI8=; b=hnCYq5Dzl/7iLI0rQYbkc9CUi17FFpKYPMxOnHcemCexKvxTdFYuaru2TQEImK5o9e jTn4K6Pp9zXxdmmJsMb8gD9S2GQ92Q72Ifh8L6RxwgBOR83AYlvxa/V/6Fh3hPXQBoiV z9gKOGSH8bAn5zRrapQGO1yAInmO8o8qVZTpVMRyYOG1CV9m59KTFXQeJKBj8sjGVuru vuCXHX5KYhKDn13HSZVsP5Lq2Qz50f1zC2IoyROHSYrzPF6xJDEsucHmTbgNlZ1jt64p EjINJfxYuBjgAhCrq5BfDf3e2GoiGGEqH9e7WYG8IshZ6uH7iubAr54kkd/PnEXO2Hgf kVGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680710727; 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=z2hst+C2Hubq09FNgBe92GHruUqjFSuaPIAbKjAIoI8=; b=Q29OO8tCXMtmqog7IN0eE/V5HU0HCFJ5T5rxTkZobQcI9sMKqS+09qf3p9wvrZCuNs 1D+jZ4K5AX3CwzLWplf7Cr5afsmN5xu6OsldwA2XRZ3TjyibZVet9osCnVHUCsDyLgM6 tguF9oysjBlKQ3A8t7Ii2U8FTc73npVx4U+40053JeOpW7xD3ariE0BVVxIV9SCtoMJT YxQK5Jw4y5qwiH8f0Uxy/B2ri7OFbgR2pzq9Zp1ZHZLsIROAO3edCOjW55ZXr4L3VcSO r6tL7MkAnLinKnX3/t0ErAZmMU0JTBiL25/NiA7p3VLl2+2XQDHy+Vx6lyjFIbxQIHMj HoUw== X-Gm-Message-State: AAQBX9dfB/0BQuDH4ERMZdecZihcFGsvermoY/6ETmIb4aYR7zKrDoV5 +PwYKCM/IPjninSb0LV/mQEcQCPXXdSdgXQHldY= X-Received: by 2002:a05:600c:253:b0:3eb:3f2d:f237 with SMTP id 19-20020a05600c025300b003eb3f2df237mr5280415wmj.6.1680710726924; Wed, 05 Apr 2023 09:05:26 -0700 (PDT) Received: from localhost.localdomain (4ab54-h01-176-184-52-81.dsl.sta.abo.bbox.fr. [176.184.52.81]) by smtp.gmail.com with ESMTPSA id y9-20020a1c4b09000000b003edf2dc7ca3sm2586415wma.34.2023.04.05.09.05.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 05 Apr 2023 09:05:26 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, qemu-riscv@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, kvm@vger.kernel.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Radoslaw Biernacki , Peter Maydell , Leif Lindholm Subject: [PATCH 05/10] hw/arm/sbsa-ref: Include missing 'sysemu/kvm.h' header Date: Wed, 5 Apr 2023 18:04:49 +0200 Message-Id: <20230405160454.97436-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230405160454.97436-1-philmd@linaro.org> References: <20230405160454.97436-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 "sysemu/kvm.h" is indirectly pulled in. Explicit its inclusion to avoid when refactoring include/: hw/arm/sbsa-ref.c:693:9: error: implicit declaration of function 'kvm_enabled' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (kvm_enabled()) { ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Leif Lindholm Reviewed-by: Richard Henderson --- hw/arm/sbsa-ref.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index 0b93558dde..7df4d7b712 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -26,6 +26,7 @@ #include "sysemu/numa.h" #include "sysemu/runstate.h" #include "sysemu/sysemu.h" +#include "sysemu/kvm.h" #include "exec/hwaddr.h" #include "kvm_arm.h" #include "hw/arm/boot.h" From patchwork Wed Apr 5 16:04:50 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: 670319 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp363896wrt; Wed, 5 Apr 2023 09:06:51 -0700 (PDT) X-Google-Smtp-Source: AKy350ZCSTucVjkmZb/qA6IF0otP0r4fspkZgsbUZWxeLNrD41+qD3m/ywBtduEiAPrKZKGrG/G/ X-Received: by 2002:a05:622a:c2:b0:3e4:eb53:b02c with SMTP id p2-20020a05622a00c200b003e4eb53b02cmr5051046qtw.60.1680710811633; Wed, 05 Apr 2023 09:06:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680710811; cv=none; d=google.com; s=arc-20160816; b=U0Dta6tEc7mUv/yOfIy5Pte5UhEtlVAVVGTa7sg2F8egmr3oW5HlvrCz+eJ8YY7HFM f4s8WcSSth8x/tN4lGggKqoRv0ZbSwUaQ25NUpwBCK9pbw4Kr9X6bDn42S20OdJb2PSO aX6csYRkAzrmh3aF+4bo7DbfmSFbG0RUBLu6miV1DlqmcUySdXHOM4ubYwufCnRaVrUU j+eCaAhcY0LIKPFEvoL0VHoBBVMwqfpU6RVvpa/gKZcm4aF4kwQjX0omX34ZVprJE+Wt lqUrRqkuenbGX70pHO+X92r/oDIPVho74WFFgQzO1kkXqZ2m3FUmsYVKDxiUOOyXFA7D jAig== 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=TXAiv5gPJGzakn6yAF3UQ469jIKkZR4r/iuFrCC5frw=; b=DGKAijxgyoq5TKiWjPAg8rs+eeQb4ABxZ6v0n4aahJh2YdVbYBqM2esUtN2xrhkhAn /mfBgZgBHXIGeDz/8FL1d5cU5bJol0vaG5Kis4gq8Hr7RYFjZt7HNOHy7Q1hUlVUve+3 fP1ITZjL5Gx6S6w9ccJ+EWO0/rs27GPeQggD8yOCSySioOS3B4ld1v/tLmSck56oAjPt /o6awdv+DnuqxhEUmVXuAVCKjkMg0RJDKA+RQGKfBZkdyYr3tKpsviLSeYnhugdQ+jaL JGvBJ36ESjEJLQFph/cITo2nPgAvVePaiYyfS/UcXvfSk/Rzu1FnkOqSCh579X2EbPnI 5J9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MK0k+l7i; 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 22-20020ac85916000000b003e63c6ee215si9981438qty.29.2023.04.05.09.06.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Apr 2023 09:06:51 -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=MK0k+l7i; 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 1pk5dn-0006C3-N8; Wed, 05 Apr 2023 12:05:43 -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 1pk5dg-00069I-M9 for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:05:38 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pk5dd-0007XG-Uh for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:05:36 -0400 Received: by mail-wr1-x42d.google.com with SMTP id m2so36728800wrh.6 for ; Wed, 05 Apr 2023 09:05:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680710733; 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=TXAiv5gPJGzakn6yAF3UQ469jIKkZR4r/iuFrCC5frw=; b=MK0k+l7i0JL0N5tdLRQup0z/tS+z9fsal4eicREogGdlwNf9QVbabnZfiviIAYfHBf JA3Z4LTUT/MZ/596XiLixMfrIvzM7ysklzUO4TTvJDt47/2W4D9/CzYhb/QcW2qM2DGh lV8PnFchupvt62JB8kdIM3YEQBVwi8Y5uTliYYgPdnvE4XiaGrBARmupflOVkRocZ/k8 F0CNMkRh//wn/9/AGrldf70UiFQf2BIvuEBy7QwNDJ6vwKQhDdHoszOmXwaWZsR7hKME u0GX0l3gc0dvqJ6SgJT7MSeNx+4HHimdvMSdJ5XvGckOBpinv7ZG0pcUGyBpL8WdzMFG KJHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680710733; 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=TXAiv5gPJGzakn6yAF3UQ469jIKkZR4r/iuFrCC5frw=; b=ohgnb9HeZfohtbGsTGV95VVDmuFA4Zocx+LP1edUzMbHk1uBfxgd5sUEKnYChQ5/FJ B8cpQGdM59pUE62lJkHOmibr4cvPktjjyGTQvnMLhoXeMaXtu5dOhfm1g8gNCY1+bGi5 +qFPPUF8h3pI80RLfJxv7jTfOzvkhktIkjsl1gKGaKzJ6TJtBhSVZP7eOs9jM8DZT6cZ xxV28z7pYwkoZgaESQoh44GRAvebEYuO6YrhdEl639WjON+Xa6OPtYwEMusLlYT50lkW LXwgGVMgMFQbb4G3fu8JEL6ATNALkUjw58jNmn4pT4pPnYfmenb4MEnI+k7/CJp4gHzZ e/NA== X-Gm-Message-State: AAQBX9dkRcZP1fKZIsfz1TSp4yILYDPKivMFIyuxk+VnAxPLWZpA6T1J xJdd5OTh+YwU35ECpSAKsWHjy0CkEjoBdzJeimg= X-Received: by 2002:a5d:52c7:0:b0:2ce:a9e9:4905 with SMTP id r7-20020a5d52c7000000b002cea9e94905mr4246512wrv.34.1680710732675; Wed, 05 Apr 2023 09:05:32 -0700 (PDT) Received: from localhost.localdomain (4ab54-h01-176-184-52-81.dsl.sta.abo.bbox.fr. [176.184.52.81]) by smtp.gmail.com with ESMTPSA id m19-20020a7bce13000000b003ee1acdb036sm2606127wmc.17.2023.04.05.09.05.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 05 Apr 2023 09:05:32 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, qemu-riscv@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, kvm@vger.kernel.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Peter Maydell Subject: [PATCH 06/10] target/arm: Reduce QMP header pressure by not including 'kvm_arm.h' Date: Wed, 5 Apr 2023 18:04:50 +0200 Message-Id: <20230405160454.97436-7-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230405160454.97436-1-philmd@linaro.org> References: <20230405160454.97436-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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 We only need "sysemu/kvm.h" for kvm_enabled() and "cpu.h" for the QOM type definitions (TYPE_ARM_CPU). Avoid including the heavy "kvm_arm.h" header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/arm/arm-qmp-cmds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/arm-qmp-cmds.c b/target/arm/arm-qmp-cmds.c index c8fa524002..91eb450565 100644 --- a/target/arm/arm-qmp-cmds.c +++ b/target/arm/arm-qmp-cmds.c @@ -22,7 +22,7 @@ #include "qemu/osdep.h" #include "hw/boards.h" -#include "kvm_arm.h" +#include "sysemu/kvm.h" #include "qapi/error.h" #include "qapi/visitor.h" #include "qapi/qobject-input-visitor.h" @@ -31,6 +31,7 @@ #include "qapi/qmp/qerror.h" #include "qapi/qmp/qdict.h" #include "qom/qom-qobject.h" +#include "target/arm/cpu.h" static GICCapability *gic_cap_new(int version) { From patchwork Wed Apr 5 16:04:51 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: 670325 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp364682wrt; Wed, 5 Apr 2023 09:07:56 -0700 (PDT) X-Google-Smtp-Source: AKy350bxRBY7JxWDealpP/n/CFcL4jWpsd29YOXuR083Vs5anKZuNU2T6Xg1Ds9F7wnEHeKtAgDN X-Received: by 2002:ac8:4e4d:0:b0:3e6:3650:2e33 with SMTP id e13-20020ac84e4d000000b003e636502e33mr6369180qtw.14.1680710876275; Wed, 05 Apr 2023 09:07:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680710876; cv=none; d=google.com; s=arc-20160816; b=gA14rvXWo0tyXOXREFz890nwjxtPBlO77iHz6FKbmoQJ6QjFQbGeQplCY0B50y+CT7 bhfRl7o1P+4vhmX5/Mwu8iOj56dQHtarqJj8l/jukXigOjVaq8OWvsKBPRsKRkmU2mzL iWSKQxipqc4wh9WK35VgiZbkRYWIHtejVbvITmYt7Ghtjf+1AGZKw73KFvpftDCZW5Qz +Y41HfjOGoStKW1Hz3NA90wFHkHuOlur9SVuAlz1tifJwSlf/MLNLDxWtO17IL7Bpt1X f31/p+sZJjFVoZTu9FFQy/cwHcbXVSl7a54q3wU7n22uxV4pJr/jxbXnJw8xKh3X35CC uUNw== 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=qSZpkYKC0E9O8rqY27roK0ybv9W9NQfMeuFKqLZI7LU=; b=p0+G0gnba18l7oG1JKs4a9L7bBsTAC3ClYjxCfMO6V0xyKgB4UgJVZ83GNTcgIlHhX /hJ8bWU7TYks3EpOAnM23Obo/KcHTmS6thXZPPzcuxuPVlmsOZ98rOOygiweT9+jt0XW 4yG/bIWosz924ET86b785YJGVyiJH79mUvza9MnDXYvqhN//rAvJffPWJEWAErsjWeUE JdLRBBjzTS9AG7zMHuFeZ2/CMzMFJP4k04nAIwoaqPLpX9hCsoGWQwVwsw/5jsY1gReZ aPFhFCD/A+4Fuo+MYFPc7ga5liDq3K7JzGWmiRUdKzoktOI/LB7a3LADvDIYvdrfBH7R e78w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wqNCwi87; 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 j14-20020a05620a288e00b0074a2b7c652csi7872276qkp.113.2023.04.05.09.07.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Apr 2023 09:07:56 -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=wqNCwi87; 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 1pk5ds-0006NT-4X; Wed, 05 Apr 2023 12:05:48 -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 1pk5dl-0006CH-MX for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:05:43 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pk5dj-0007XC-6g for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:05:41 -0400 Received: by mail-wr1-x42e.google.com with SMTP id q19so33657819wrc.5 for ; Wed, 05 Apr 2023 09:05:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680710738; 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=qSZpkYKC0E9O8rqY27roK0ybv9W9NQfMeuFKqLZI7LU=; b=wqNCwi876yROugf5tN+kiLbImBLgk+uYIjohRocygCiSXtq0GiLxJMZsXSek6pHpVR +vfvjXSlWK4qWKr94gcOADBrEVPqgm5CfvJ9deGOWUrdCVM9PHovYkwZHujef3O8MtOZ eXzc0P4Y5NXAVWdLu6uqolhV733Ybgg5UBVQpSLnRk/q1N+A6GEHjHvVwc3QqBqwAdiy BNPfLSrZgGarjn1j7MUV3SoT0FiNvFRNxXYmemHmO/109VPWZrGM4pBbcOVF8ud8YiU5 ASlPsQUvC0UDNDeGKeDi0tm00GS1Eunn4AndcQhBbXGrCKw7wvhL9RVtanHs8lJbVSrB h7iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680710738; 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=qSZpkYKC0E9O8rqY27roK0ybv9W9NQfMeuFKqLZI7LU=; b=G3WWHk9/SFAtxbWXcYHiEhGqlqsUSLjcibyMpZD0/+UDUGdewrY+crv+ZCtvbxBD4/ lYehqi4nV8vC7BJOhGGcvLCk9eFxiCwS1l8XLd+U05II9dqB3KRsY/IbPH0bithd6wqr HVmmA4hXESx4fbiQBERy0rng4JuPw5zJ8cLqB2NFVyEH8jQz6t136zmr/kSnmEdgxmpq C4pCybQXisQzEh8Ut/Ywrt03ExVDyagARzI0NXIdXFQMItbRJWSz4/Jswjj2q83bQxz7 3Nkibg+WhW/USSFyXj3/c0Pn2lZoaVZEr3wT9ESYSm+hkfNsZ6Gy8KYYL2+fjOgMM0I1 Rirg== X-Gm-Message-State: AAQBX9cdnleIfbnbl4dUBM90mRfgXUiDdGympVdAMxaUmP7QRmcj1dod yJ+ZC1BoJ+CnBCLm2lJv3o5LpMd6V2OIkY7xLzU= X-Received: by 2002:adf:eace:0:b0:2ce:a098:c6b8 with SMTP id o14-20020adfeace000000b002cea098c6b8mr5030406wrn.55.1680710738191; Wed, 05 Apr 2023 09:05:38 -0700 (PDT) Received: from localhost.localdomain (4ab54-h01-176-184-52-81.dsl.sta.abo.bbox.fr. [176.184.52.81]) by smtp.gmail.com with ESMTPSA id q18-20020adffed2000000b002c70851fdd8sm15263762wrs.75.2023.04.05.09.05.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 05 Apr 2023 09:05:37 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, qemu-riscv@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, kvm@vger.kernel.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Peter Maydell Subject: [PATCH 07/10] target/arm: Restrict KVM-specific fields from ArchCPU Date: Wed, 5 Apr 2023 18:04:51 +0200 Message-Id: <20230405160454.97436-8-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230405160454.97436-1-philmd@linaro.org> References: <20230405160454.97436-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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 These fields shouldn't be accessed when KVM is not available. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/arm/cpu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index c097cae988..efd1b010d5 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -945,6 +945,7 @@ struct ArchCPU { */ uint32_t kvm_target; +#ifdef CONFIG_KVM /* KVM init features for this CPU */ uint32_t kvm_init_features[7]; @@ -957,6 +958,7 @@ struct ArchCPU { /* KVM steal time */ OnOffAuto kvm_steal_time; +#endif /* CONFIG_KVM */ /* Uniprocessor system with MP extensions */ bool mp_is_up; From patchwork Wed Apr 5 16:04:52 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: 670318 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp363776wrt; Wed, 5 Apr 2023 09:06:42 -0700 (PDT) X-Google-Smtp-Source: AKy350ZpZt3oSyg1k8NO1etvpRHol/dwDVGH+hfK2getx+D5Xw7+XQJqShPgtBgm+ZhKh1NoPYeb X-Received: by 2002:a05:622a:1ba8:b0:3bd:48:70a3 with SMTP id bp40-20020a05622a1ba800b003bd004870a3mr6167512qtb.1.1680710802096; Wed, 05 Apr 2023 09:06:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680710802; cv=none; d=google.com; s=arc-20160816; b=tqtUkF1PJHqQIGbyHow7gwvZd0PVKJneE3t0xClz7fs859InEYzB1mWnKXyUZApKAy fDdBjXdfGFR7gSXsfUMPMhh8KC5WhB5ZvGHh7nrEPOBb92YonnGNAMuN3NmAK4rChgAx aWOihM41oaW91xSJ8i04IOkvqWMCGjLew91QpPLR4WMrgCiwYxzw1UY9sY7c8nMyKCbH 7ZD9N+t9Z+p3+OFjMOOshRLyhRBjn4tZ25eBNvxue3Iq3SO9hRFHHXqtn25NCjUMI4dn Yx0N1hRTfh9gYDhtBIxZtaXMgxCRhugEBlMH/tMPRcHHZLAQ/xCmrZ933fSKlAFYq39E 1lxg== 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=1nroHqABUajLqRunlI+qD37HAN4v8HXiRYQrqBTvdwE=; b=SNN4xgOx0qBAV35S32cv2M30rWF/5Lq7OOWhI6OlZcRFTOh+TcX/zupWaSM6P+lTjI V+a90fZj0IHwWzH83If3HUJrBgvMXWQhrTrybt1xyeMTjXi4RmdQ/KtqjUdek/2GAR5G XJMoffDQZyR/KXrECv9Vj9EXy3SE/fs+B5lIy3kWNqYdpuxS55ivv7X+2lQZf7GwnrOe 4wBQhAHl5/HUU7lb5pLBMgoilLYVVSl/N2EfymBL8nHvPQJSsJbaZBtFDiPBVgo3MpJ0 JOCLZgz17Mmyu5bzI8/rJ01/1GdJks4+5wU8R0oIyr69/vN6VR2XgrutErKblFdy9jYh 3VAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qw5qTTc4; 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 22-20020ac85716000000b003b634a2268esi9790459qtw.643.2023.04.05.09.06.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Apr 2023 09:06:42 -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=qw5qTTc4; 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 1pk5dt-0006Ph-W0; Wed, 05 Apr 2023 12:05: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 1pk5ds-0006OD-Jf for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:05:48 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pk5dp-000833-LK for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:05:48 -0400 Received: by mail-wm1-x32c.google.com with SMTP id l10-20020a05600c1d0a00b003f04bd3691eso7394308wms.5 for ; Wed, 05 Apr 2023 09:05:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680710744; 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=1nroHqABUajLqRunlI+qD37HAN4v8HXiRYQrqBTvdwE=; b=qw5qTTc4CNQPm1h/LZ0mTTXy0OF7gIZq7jkcglSCTingvHz0cqXrBwBojetrVCnaEU V3XSlu7iPDyJb/v2VW6Mfo7ZEcibrTott+zYeXs/SZP1HCHBMI39vaj3sfGTFwJQbfZo bPbd459qPJhpcD9HW2tSPRWW6uWhsivNaPaKQ8L/mgDLhLP0gasJOaP/HIEJmenRuRRk umwaalz/6EAfiwgdglIA20tavSVgQWBEjmI01ISEOl/XiJZYm6MLszMBTX98bQRndoHx htVpU34jeAGTXaELsldCnNYgFUNan9n4kpcE+bf1j5dhHWTQfNnLz94EFHsmMlTBB75M MoXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680710744; 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=1nroHqABUajLqRunlI+qD37HAN4v8HXiRYQrqBTvdwE=; b=hYQb5X3JDT9QWT1qbtePcQFoH62PTlzWRKkxja+3rT5rChZu+oP62ikFKPQxPD5tw/ B74px6a4Qcr9rpdcD838mDDe1g2grUGGXuUZZoKEuco4pf4zWp1ct7JjZW/qxDRKd7kE qXo0W4y7T7/1K4JZENKQ73enFm++kWH+BF1xmaiUKDdUcZ9XYwyUdSaZ+rvow8XV00zL NM/6JVnjhbiiksT/RLd6lUkgZmAyvzwWXmGTUl+qhZV5xnDve1QaRR1l8dvZ/TYMmuyq IP3oUg37V81llJtUqPKDt5ufG8Msu8jJAK1EcXsJODyjwViH+phEtx555BNuo6yYw0hB k3yw== X-Gm-Message-State: AAQBX9cA7Ffi2pGmHHqckuxkZ/EwnNISjMd/UlYf+5/dQiy9l2iy+lGJ PCY2RmpAychstviU/JPNRff6jtLC4PJo/Fm4HXM= X-Received: by 2002:a05:600c:20f:b0:3da:2ba4:b97 with SMTP id 15-20020a05600c020f00b003da2ba40b97mr2228281wmi.19.1680710743845; Wed, 05 Apr 2023 09:05:43 -0700 (PDT) Received: from localhost.localdomain (4ab54-h01-176-184-52-81.dsl.sta.abo.bbox.fr. [176.184.52.81]) by smtp.gmail.com with ESMTPSA id o11-20020a05600c4fcb00b003ebff290a52sm2565572wmq.28.2023.04.05.09.05.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 05 Apr 2023 09:05:43 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, qemu-riscv@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, kvm@vger.kernel.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , David Gibson , Greg Kurz Subject: [PATCH 08/10] target/ppc: Restrict KVM-specific field from ArchCPU Date: Wed, 5 Apr 2023 18:04:52 +0200 Message-Id: <20230405160454.97436-9-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230405160454.97436-1-philmd@linaro.org> References: <20230405160454.97436-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 The 'kvm_sw_tlb' field shouldn't be accessed when KVM is not available. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza --- target/ppc/cpu.h | 2 ++ target/ppc/mmu_common.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 557d736dab..0ec3957397 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1148,7 +1148,9 @@ struct CPUArchState { int tlb_type; /* Type of TLB we're dealing with */ ppc_tlb_t tlb; /* TLB is optional. Allocate them only if needed */ bool tlb_dirty; /* Set to non-zero when modifying TLB */ +#ifdef CONFIG_KVM bool kvm_sw_tlb; /* non-zero if KVM SW TLB API is active */ +#endif /* CONFIG_KVM */ uint32_t tlb_need_flush; /* Delayed flush needed */ #define TLB_NEED_LOCAL_FLUSH 0x1 #define TLB_NEED_GLOBAL_FLUSH 0x2 diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c index 7235a4befe..21843c69f6 100644 --- a/target/ppc/mmu_common.c +++ b/target/ppc/mmu_common.c @@ -917,10 +917,12 @@ static void mmubooke_dump_mmu(CPUPPCState *env) ppcemb_tlb_t *entry; int i; +#ifdef CONFIG_KVM if (kvm_enabled() && !env->kvm_sw_tlb) { qemu_printf("Cannot access KVM TLB\n"); return; } +#endif qemu_printf("\nTLB:\n"); qemu_printf("Effective Physical Size PID Prot " @@ -1008,10 +1010,12 @@ static void mmubooke206_dump_mmu(CPUPPCState *env) int offset = 0; int i; +#ifdef CONFIG_KVM if (kvm_enabled() && !env->kvm_sw_tlb) { qemu_printf("Cannot access KVM TLB\n"); return; } +#endif for (i = 0; i < BOOKE206_MAX_TLBN; i++) { int size = booke206_tlb_size(env, i); From patchwork Wed Apr 5 16:04:53 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: 670321 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp364053wrt; Wed, 5 Apr 2023 09:07:04 -0700 (PDT) X-Google-Smtp-Source: AKy350ZDjqwgq3EywjLYUVurlt1qFSJhyrnzzspgNsvP3ynsvJ9MRmW+ZXHaur+/nCrhA4FzZoHG X-Received: by 2002:a05:7500:4e84:b0:fc:ec57:73b7 with SMTP id lc4-20020a0575004e8400b000fcec5773b7mr463044gab.20.1680710823708; Wed, 05 Apr 2023 09:07:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680710823; cv=none; d=google.com; s=arc-20160816; b=P4urn/JxjBNXO0izrIgTgdj25oCMweq8ehLCfFTl3E716NeuQULoPMtPwccNkjoJWE aQ60DZbNpEqLm453DZyFFy/t7tqKIWqCMY8gqv4R4KoOXOaCAPEL/ZibgcdLyiCY8ktu XA6fKJnPca+QSzG9eNwKC1yEq4BuBzk9TCdwT8upoKk4a6gB3063E+U58mWWhRjyyyhE msaymfobcRzBHQHRoqS7hWokhfrIDB1/iEzPWCOkAxw2NgljTPpTJvb2KbJR86NX/aQC hnvyCsUj+IeMwJIEdsAHXoz4GY4gJqM8ubMVuUsvk2+vglnwW963NcdQDEE1DhcAZWkG 1Mcw== 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=v6WERmjWn5FvlAk9wBZ9HpDjQNTvh7yNAmb4fbxF/bQ=; b=pT//5mL+xmUscJctYjeCvzW3rl12Jf2EV6YAYrX0guQqOMPltLwbsOAX4PFhcF/q0T dB8ElYhKS+MtfxHUhAACqf5DiYS9wVO6mZFOyesFXUdmC3jQZrlVCty5ZlkE8yM92l1G E39ADyOSvWiU25tyxNsXn93Ui+zKZ2pqF59LJTfv1hiXI+m6NYVfKaxq0iol7vA7BgE/ tWp7RlNuk3tsYuDfvCqFQNq+weAh+cVSQLzdI32ORv27gZFaSd+o7jctmGOGxDor8ZPX eOMIuah7hGbNK2WiSZsD8tPkWmu0LhoFkGqVvRJVfloa9Daio7wNXxuVLUJsm3NUzl3y 9dxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ui9pQqlk; 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 r136-20020a37448e000000b0073902217295si9460840qka.293.2023.04.05.09.07.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Apr 2023 09:07:03 -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=ui9pQqlk; 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 1pk5dz-0006Xx-AB; Wed, 05 Apr 2023 12:05:55 -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 1pk5dx-0006V9-HQ for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:05:53 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pk5du-00082v-NV for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:05:53 -0400 Received: by mail-wm1-x335.google.com with SMTP id m6-20020a05600c3b0600b003ee6e324b19so22308882wms.1 for ; Wed, 05 Apr 2023 09:05:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680710749; 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=v6WERmjWn5FvlAk9wBZ9HpDjQNTvh7yNAmb4fbxF/bQ=; b=ui9pQqlkMvaDWCZp6I6ifckgckCFMdULH8djIjHBtGiKqLjSUyanx69f6iIYVMfxSY PDG366DUK3lbyUBNP2TISRXho9Y39mi+0yOtKEssWyJs8AW+r0iZXdfVcgRVJmp8SyvR jPWJ8qjkwLGf7F7Iy7M1OZPrcf0uWtn65EXI26LFqGpDfTiuMP6i+YQtxah+yEf+3N2I NfyrUvV8ItcveuyyyrfgYuOGCWAsChzWI0Cy5GdHPeHvnwaJTnTNUDpZ7tRMAHPsQguV 7ankTk82Gs8dVyGeY4jCBSGFQ/hPIEZB2U94cG+S76nY5p/JXNSjjluwvo8eICuJ2rnX GNLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680710749; 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=v6WERmjWn5FvlAk9wBZ9HpDjQNTvh7yNAmb4fbxF/bQ=; b=Exe/NRP/sJLdKBTJNGV0YOf+7fddqj9LJMbzm468vxz8yppYJTP6/W6nYFu1WNigAu qt2jzR7V6Rfh2uq9BZ/VEQoaQxRSteEoLoDBUrJ5xZLfzRZD/13jUIUqpxoF3YqWeag6 qF3upyODFNlT/vEIhHVik44GEgSJFmGUZWnQ4/yPMHUOn0rpQF3yDqSI5SMC54QwUgTc lRhrrHq9M+Ny3n33Z7cJEVGNUUPvfcLkNkYgzr4twfuIdra1prBGWio3uU9nxMHuCTEa 7LSCPwT66up8MKgHilT5czuQTH7Pzd5uqAhdiPYENCXdYXTtacPkQEKIN89YFQelimIB j9Kg== X-Gm-Message-State: AAQBX9d7KmFGZ1GX1HSTscvOswskreLQukmneJOgjsp7hEYona5+uapi S+RXUl/diqmHn/NsgVZ6XXY4NIvobS7XmdYw0a8= X-Received: by 2002:a05:600c:ace:b0:3ed:ea48:cd92 with SMTP id c14-20020a05600c0ace00b003edea48cd92mr5367145wmr.15.1680710749843; Wed, 05 Apr 2023 09:05:49 -0700 (PDT) Received: from localhost.localdomain (4ab54-h01-176-184-52-81.dsl.sta.abo.bbox.fr. [176.184.52.81]) by smtp.gmail.com with ESMTPSA id p26-20020a1c545a000000b003edf2ae2432sm2600498wmi.7.2023.04.05.09.05.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 05 Apr 2023 09:05:49 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, qemu-riscv@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, kvm@vger.kernel.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Palmer Dabbelt , Alistair Francis , Bin Meng , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei Subject: [RFC PATCH 09/10] target/riscv: Restrict KVM-specific fields from ArchCPU Date: Wed, 5 Apr 2023 18:04:53 +0200 Message-Id: <20230405160454.97436-10-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230405160454.97436-1-philmd@linaro.org> References: <20230405160454.97436-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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 These fields shouldn't be accessed when KVM is not available. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza --- RFC: The migration part is likely invalid... kvmtimer_needed() is defined in target/riscv/machine.c as static bool kvmtimer_needed(void *opaque) { return kvm_enabled(); } which depends on a host feature. --- target/riscv/cpu.h | 2 ++ target/riscv/machine.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 638e47c75a..82939235ab 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -377,12 +377,14 @@ struct CPUArchState { hwaddr kernel_addr; hwaddr fdt_addr; +#ifdef CONFIG_KVM /* kvm timer */ bool kvm_timer_dirty; uint64_t kvm_timer_time; uint64_t kvm_timer_compare; uint64_t kvm_timer_state; uint64_t kvm_timer_frequency; +#endif /* CONFIG_KVM */ }; OBJECT_DECLARE_CPU_TYPE(RISCVCPU, RISCVCPUClass, RISCV_CPU) diff --git a/target/riscv/machine.c b/target/riscv/machine.c index 9c455931d8..e45d564ec3 100644 --- a/target/riscv/machine.c +++ b/target/riscv/machine.c @@ -201,10 +201,12 @@ static bool kvmtimer_needed(void *opaque) static int cpu_post_load(void *opaque, int version_id) { +#ifdef CONFIG_KVM RISCVCPU *cpu = opaque; CPURISCVState *env = &cpu->env; env->kvm_timer_dirty = true; +#endif return 0; } @@ -215,9 +217,11 @@ static const VMStateDescription vmstate_kvmtimer = { .needed = kvmtimer_needed, .post_load = cpu_post_load, .fields = (VMStateField[]) { +#ifdef CONFIG_KVM VMSTATE_UINT64(env.kvm_timer_time, RISCVCPU), VMSTATE_UINT64(env.kvm_timer_compare, RISCVCPU), VMSTATE_UINT64(env.kvm_timer_state, RISCVCPU), +#endif VMSTATE_END_OF_LIST() } }; From patchwork Wed Apr 5 16:04:54 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: 670326 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp364739wrt; Wed, 5 Apr 2023 09:08:03 -0700 (PDT) X-Google-Smtp-Source: AKy350attZqLsp+VcRYWCdtwn0z52TO0Aotdd1CuTZg//rUlntX9dX8TCOJ02IZ6EH4fui87+fdy X-Received: by 2002:a05:6214:20af:b0:5b5:a816:6b27 with SMTP id 15-20020a05621420af00b005b5a8166b27mr9017057qvd.8.1680710882824; Wed, 05 Apr 2023 09:08:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680710882; cv=none; d=google.com; s=arc-20160816; b=YGwrv53MWVCEF+EuZeLj6xf/Vrtqkz8Fc7nv3sL8Ra0lxvnwKQKpSCY/j7yJvyk6wG lcVqzDttyS7oiuN9mkRsXV2FJCWTTryY0uVmdQb0GBXHiuTvV0bqnwDAxDZm+inuA0kX DwiOm80HNsKnBtg1nfFBi9fDjnyWAkz46dN45JSReBhlz71J6XmAKSabOY63Pf8Mlhcf LLUZCQhFG/0o9X5/I0m5xHE5m986AZYre5Q+kvxDUbl6M29tcZ8HKXUdkJHbQODXlUK0 jW4R/4b7jfbI/HwFIjczJrdq8X13pcI394rFIOUeA9VyokAVBehsXGbiSqfPU3luZtUD FXbw== 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=YCSdJqBx+24lo5un4mJkeawVRhwXkPODtT/ypBXdn1k=; b=muqpiC85BQPkFVnGghLCmcJYmYc/cyb2cmhw9XgBrC+ToejELieeJ4jivKp0E1X/py q55k+wjiG99p2YiYKI1/VVAv7S2XFYraXGDV4EJgC9uLU68/9nGoxiB1RPYV35MZtQH1 LcfroBok50PKU7GoqL4C48Z6zCSqt3u3zXtmu1p3r7EfZItBVTBakn2uda7dPWKJ04DG nUove4deW2Ua4/zRdjYPHwgq+zThGlc5S9QHz8PryhOHzHs542HIPG6WHNVAgcbMUXmA HrMux2tYFIKQUuSzN6cO6mIghN9WfSStYTEA2lP+CN4olM0wA1xnajiHVNQVdg/X/p+x JVEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nYNsq+8y; 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 o10-20020a0562140e4a00b005e1c41bc9b6si9494619qvc.437.2023.04.05.09.08.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Apr 2023 09:08:02 -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=nYNsq+8y; 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 1pk5e6-0006ug-6L; Wed, 05 Apr 2023 12:06:02 -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 1pk5e4-0006o8-0N for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:06:00 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pk5e1-00087N-6X for qemu-devel@nongnu.org; Wed, 05 Apr 2023 12:05:59 -0400 Received: by mail-wr1-x431.google.com with SMTP id h17so36705801wrt.8 for ; Wed, 05 Apr 2023 09:05:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680710755; 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=YCSdJqBx+24lo5un4mJkeawVRhwXkPODtT/ypBXdn1k=; b=nYNsq+8yFO7mMRk2/GCs4D4e2iDu1F5AjhPlSj5MwnASO0hw5U/4oxpVLogb6drfmz 3xU+KV29anaINmgzTl9ZhOc9H9utB1dE343KJ/Ch3nsDN2awoc2m/uGIUTaVMxmzxSgG xqRD/xBZxEreYRjFvoqcqzu5XK6hiX/J8pDK3O5eVEHmU9QCzAK4BaAmplmm9aESOaiO ae6Uv7SF5z/IgEENdF+M+eAcH47+wYVpnVgBJUOx9FPSM7Zy1/YL3ZUrvW8BmVJCLBZH ZI65eOSaRJWzT4iXngpJ6wyoT9UFNgKF6YSG3WUY8ns0z8i9D9egnrZvA5oKcJER0raT J/qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680710755; 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=YCSdJqBx+24lo5un4mJkeawVRhwXkPODtT/ypBXdn1k=; b=fK58KzfHMntZwFzP3U/7JWbyCY1/uLcUOmUI8ErVqgksox53xY0W8BE5J2JkW7ZU/r Z+pK6suQymbAYZG7WvzkAxUVEjkdvd6FPlD21oKDZaOLnWMVSet6Ln7L67XXc1fcFFGF OjVIsmnGlhebHOrKGtpzFeLm7+eIShVQ5Uh2QqG+EWKhP4xy/wMwg3eVUow22X39hARP FjZJS6bxG9/lLTSpxZ5YtMERhQG3woP0IVuLl/LMtYyFBMS835423d6S4DkmQQ9ywCic VG038fDVyunTVYtABkPoEU+jH8znlWTDJnmzPLrrUrYfwA4f6JxKAyqIxAgvm/LUhlhj tnKA== X-Gm-Message-State: AAQBX9frlOow8W+tKOYyQOas9Woz8MNHzVGg3PiDQvjXWmMrGLhgBV+b HN4Rt2W0r07WN9LWIda4n15V4nh0cVrl/RQvD0Y= X-Received: by 2002:a5d:4745:0:b0:2ce:a835:83d4 with SMTP id o5-20020a5d4745000000b002cea83583d4mr2147619wrs.27.1680710755745; Wed, 05 Apr 2023 09:05:55 -0700 (PDT) Received: from localhost.localdomain (4ab54-h01-176-184-52-81.dsl.sta.abo.bbox.fr. [176.184.52.81]) by smtp.gmail.com with ESMTPSA id a12-20020a056000100c00b002cea8664304sm15199709wrx.91.2023.04.05.09.05.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 05 Apr 2023 09:05:55 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, qemu-riscv@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, kvm@vger.kernel.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Halil Pasic , Christian Borntraeger , Eric Farman , Richard Henderson , David Hildenbrand , Ilya Leoshkevich , Thomas Huth Subject: [PATCH 10/10] hw/s390x: Rename pv.c -> pv-kvm.c Date: Wed, 5 Apr 2023 18:04:54 +0200 Message-Id: <20230405160454.97436-11-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230405160454.97436-1-philmd@linaro.org> References: <20230405160454.97436-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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 Protected Virtualization is specific to KVM. Rename the file as 'pv-kvm.c' to make this clearer. Signed-off-by: Philippe Mathieu-Daudé --- hw/s390x/{pv.c => pv-kvm.c} | 0 hw/s390x/meson.build | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename hw/s390x/{pv.c => pv-kvm.c} (100%) diff --git a/hw/s390x/pv.c b/hw/s390x/pv-kvm.c similarity index 100% rename from hw/s390x/pv.c rename to hw/s390x/pv-kvm.c diff --git a/hw/s390x/meson.build b/hw/s390x/meson.build index f291016fee..2f43b6c473 100644 --- a/hw/s390x/meson.build +++ b/hw/s390x/meson.build @@ -22,7 +22,7 @@ s390x_ss.add(when: 'CONFIG_KVM', if_true: files( 'tod-kvm.c', 's390-skeys-kvm.c', 's390-stattrib-kvm.c', - 'pv.c', + 'pv-kvm.c', 's390-pci-kvm.c', )) s390x_ss.add(when: 'CONFIG_TCG', if_true: files(