From patchwork Thu Nov 23 18:35:12 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: 746514 Delivered-To: patch@linaro.org Received: by 2002:a5d:6706:0:b0:32d:baff:b0ca with SMTP id o6csp1037515wru; Thu, 23 Nov 2023 10:40:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IGiorzv9V7Pi+NCHXQ+xww/GiyGIU8QIw8ym6A9vnA+k0Dn2Dk64YBQqNezGPWLJmvcQdr6 X-Received: by 2002:a05:622a:1495:b0:418:f70:df1 with SMTP id t21-20020a05622a149500b004180f700df1mr237791qtx.42.1700764828396; Thu, 23 Nov 2023 10:40:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700764828; cv=none; d=google.com; s=arc-20160816; b=DCDk05vnseG82xl9XNQt+Jpls53Ya8FW8yme7I4aqR36xO505SaHu9fL9LXsXRnWxP nYx49WuU1KKl9PuWutmxuIEOApu+g8dIxOQsSaMfAJQsvcgsxvG1/sgQh8ENZnxzxi5t DPdJdmlaNvfsJx7VNsXS8HrEfbBbWvZ3cE12KW0g91QkQdn6UtueB4TpUKlnHhlP24x6 17KNF0TBHYzPL6Nt9oILoY3FnCHF2o/MCa6kITbRwsp1jNpW7j42iaEV2QZZlbgjI7us spC1h6bPNDvE9SDbfxDZAUt53ttTCyesZVkueGDVJpLLY+A07XXgMy8DiTNnH3Yzg2wu LbFw== 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=h+SHiNudBaJoVQ05FaR4tXQE9WbV9fq8fmbm8eyNxHM=; fh=vteyIG+vxxCYuwp1F8LdzHfX6jaUSeyJC9WWnpPrzwM=; b=h7BJw9LMIl36hMQV9ZhIgVrTwP+O+4S6YD2am02/HR06/WzXXHU3x/moDycqYbfT/Q e0WLYcktGxSeag2GQwozjEEDJ8B3AzbJGHBteSFRJsSd9c1xN1AAE2z5G7Cwe+4S6ilu Fsfk7bVzMiIs5SPF53lVV8zvCQyGS3DZQmppRg3EEB240KllMwyWm174pLZYDFYh1qwz 2oadRwD0GMhFUXFdNpAVNl0bVhS7sjqHpnOcfDYXePVg4kyM0Dw68l5uautm8j7M7rpp 9wvC58W1ng1tV+cnrGNEWd6OuroYeRwVvOPmBUdQnK9i2eoK3T2RAsH9u46zMyyUud5R hL/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zvQTdhXi; 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 k8-20020a05622a03c800b0042377d4b6e7si1592694qtx.28.2023.11.23.10.40.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Nov 2023 10:40:28 -0800 (PST) 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=zvQTdhXi; 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 1r6EYu-0001gG-Mt; Thu, 23 Nov 2023 13:36:28 -0500 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 1r6EYt-0001a8-GN for qemu-devel@nongnu.org; Thu, 23 Nov 2023 13:36:27 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r6EYq-00041V-KM for qemu-devel@nongnu.org; Thu, 23 Nov 2023 13:36:27 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3316d3d11e1so698435f8f.0 for ; Thu, 23 Nov 2023 10:36:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700764582; x=1701369382; 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=h+SHiNudBaJoVQ05FaR4tXQE9WbV9fq8fmbm8eyNxHM=; b=zvQTdhXiJj6hrfwnu85wFIUp1a8zz5SREPfu7WHTiR42m3MoXSMEEpAbL6yQwy2ToO G/6i0usTOpvsj6qXviLfjicgX1E8p4GpOo62Nea18TWt51E5CQkbbkxHL9n6s9V2IOa+ L2znCPU9Qb8oC6CqsERG1eNcBpfO2RiIU+/Bcv1jY1nH9fmZCBG2Opj8IMkkEtaC8Jq0 xMXIAUNz+ViYNAheS1CPO0d/Djm3MT2dEzRmyUl9NfgiMRvWUNyVVRrOm9SjiklZfZSR lKzn+RYISJIGt90GXxCbvFF9rZnAGWnTC4wzKQ34y36dEQE45ZA4d3qj7okeI1X6gwmB 750w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700764582; x=1701369382; 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=h+SHiNudBaJoVQ05FaR4tXQE9WbV9fq8fmbm8eyNxHM=; b=qC+acj/Cy5YM2o4Y/x0V2Q5FLPbxAN0kM7Ku90raprFIgTJsqTiqYqO9mVV57EFP/+ VuQBcMhQAh+5TtGvoih/N91OiwGqFmy17szggSAgpY8st2kyxfDCXse5Qn0vt/0GDMY+ NSQ3o7PrkbLanxzUwBH8537fgHrIBzQHSlGJduM9Txe/0TwXR6pv+bV4/kAvfmXRMVvz 2207HlGBun7KMYZcBBhq8vj+u+HL4nwxr6MCGt3sdaJK8KDFAUmrMlRKI4zxXcWPuTOf 5Ulqm9uye/3D7lRuq8uaLmaPCyuq0GhpEUGy8tliTtvq6jdVnyrNS6aFQQ+MhhEKhlyf xXEw== X-Gm-Message-State: AOJu0YwUAVQirHZMk770lB8nfbjoio/VtWnAoiWgyGPVsjIl74aSoN6d N1e6LSNjY88M+w+t0X14ONX9ayFaE5L3bPf5yuA= X-Received: by 2002:a05:6000:1ccd:b0:32d:c792:fcaf with SMTP id bf13-20020a0560001ccd00b0032dc792fcafmr2898941wrb.26.1700764581996; Thu, 23 Nov 2023 10:36:21 -0800 (PST) Received: from m1x-phil.lan ([176.176.165.237]) by smtp.gmail.com with ESMTPSA id d1-20020adfe881000000b00332c4055faesm2259393wrm.87.2023.11.23.10.36.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Nov 2023 10:36:21 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, kvm@vger.kernel.org, Paolo Bonzini , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.0 11/16] target/arm/kvm: Have kvm_arm_vcpu_finalize take a ARMCPU argument Date: Thu, 23 Nov 2023 19:35:12 +0100 Message-ID: <20231123183518.64569-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231123183518.64569-1-philmd@linaro.org> References: <20231123183518.64569-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Unify the "kvm_arm.h" API: All functions related to ARM vCPUs take a ARMCPU* argument. Use the CPU() QOM cast macro When calling the generic vCPU API from "sysemu/kvm.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Gavin Shan --- target/arm/kvm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/arm/kvm.c b/target/arm/kvm.c index 854e423135..dba2c9c6a9 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -80,7 +80,7 @@ static int kvm_arm_vcpu_init(ARMCPU *cpu) /** * kvm_arm_vcpu_finalize: - * @cs: CPUState + * @cpu: ARMCPU * @feature: feature to finalize * * Finalizes the configuration of the specified VCPU feature by @@ -90,9 +90,9 @@ static int kvm_arm_vcpu_init(ARMCPU *cpu) * * Returns: 0 if success else < 0 error code */ -static int kvm_arm_vcpu_finalize(CPUState *cs, int feature) +static int kvm_arm_vcpu_finalize(ARMCPU *cpu, int feature) { - return kvm_vcpu_ioctl(cs, KVM_ARM_VCPU_FINALIZE, &feature); + return kvm_vcpu_ioctl(CPU(cpu), KVM_ARM_VCPU_FINALIZE, &feature); } bool kvm_arm_create_scratch_host_vcpu(const uint32_t *cpus_to_try, @@ -1923,7 +1923,7 @@ int kvm_arch_init_vcpu(CPUState *cs) if (ret) { return ret; } - ret = kvm_arm_vcpu_finalize(cs, KVM_ARM_VCPU_SVE); + ret = kvm_arm_vcpu_finalize(cpu, KVM_ARM_VCPU_SVE); if (ret) { return ret; }