From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 507E5CEACE0 for ; Tue, 1 Oct 2024 15:38:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=32Q5lzmZrkJ5L4hpQaXBrF/A6/szWXXqzVVtbQ1nd7E=; b=pl/sb90tLuBNNU8u3L92xtdIl0 nn65kq08EamnFuYgZVFVN30Jl/BE1Dbdrgq9en5BZOo5PonCf/+2xkQepyr41gJ80+9OjSk8eau0m 8Zqat16UIhym9hFmbNBD/MhdIjJ6OaPRjp8ucTv/vGoiaAaIW0N02SeufJRsRpyGQdL3wEIEophAt 6N7U62r26XH/mp89Q1BjldCmhnaQkWag+N/LP+Wseu8cv8kFwWgjNVzUceXlft+AL2cioDzXripuR QYDJtNHL/ravtpcUPBR3uX81jaTNMKoppZIbkIju7NjXVwyl72djXxfyI5TvZ6+qE+Xob5mMJrBVV Z1Qk2FIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1svewu-00000003LZT-2vjA; Tue, 01 Oct 2024 15:38:04 +0000 Received: from out-184.mta0.migadu.com ([91.218.175.184]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1svev4-00000003LDQ-1UZP for linux-arm-kernel@lists.infradead.org; Tue, 01 Oct 2024 15:36:12 +0000 Date: Tue, 1 Oct 2024 08:35:51 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1727796967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=32Q5lzmZrkJ5L4hpQaXBrF/A6/szWXXqzVVtbQ1nd7E=; b=FR5sHTrmIz5pif3i2vsHSSam8/HnX26X81OIgTcwQTF1+8b1qzHuS1Uqm82hOXM1VmJrTB Wm4vMkgTbsYpUIJZSEX2UwsnjjQu6FEdEokcLlunUrZFfHMDYEeQG/HpVO6sVUH/SEB8+t 3Dy9ZPsJwINeQoLOZhUt1OTywf6nu7o= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: David Woodhouse Cc: Paolo Bonzini , Jonathan Corbet , Marc Zyngier , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Mark Rutland , Lorenzo Pieralisi , "Rafael J. Wysocki" , Pavel Machek , Len Brown , Shuah Khan , David Woodhouse , kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-pm@vger.kernel.org, linux-kselftest@vger.kernel.org, Francesco Lavra , Miguel Luis Subject: Re: [PATCH v5 3/5] KVM: arm64: Add support for PSCI v1.2 and v1.3 Message-ID: References: <20240926184546.833516-1-dwmw2@infradead.org> <20240926184546.833516-4-dwmw2@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240926184546.833516-4-dwmw2@infradead.org> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241001_083610_629026_A92E02E8 X-CRM114-Status: GOOD ( 21.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Sep 26, 2024 at 07:37:58PM +0100, David Woodhouse wrote: > From: David Woodhouse Please, add changelogs to your patches. What we really need here is the detail on *why* we can just bump the PSCI version like this, i.e. no new required ABI. On top of that, you could mention that KVM has made the implementation choice to provide SYSTEM_OFF2 unconditionally in its PSCIv1.3 implementation. > Signed-off-by: David Woodhouse > --- > arch/arm64/kvm/hypercalls.c | 2 ++ > arch/arm64/kvm/psci.c | 6 +++++- > include/kvm/arm_psci.h | 4 +++- > 3 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/kvm/hypercalls.c b/arch/arm64/kvm/hypercalls.c > index 5763d979d8ca..9c6267ca2b82 100644 > --- a/arch/arm64/kvm/hypercalls.c > +++ b/arch/arm64/kvm/hypercalls.c > @@ -575,6 +575,8 @@ int kvm_arm_set_fw_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) > case KVM_ARM_PSCI_0_2: > case KVM_ARM_PSCI_1_0: > case KVM_ARM_PSCI_1_1: > + case KVM_ARM_PSCI_1_2: > + case KVM_ARM_PSCI_1_3: > if (!wants_02) > return -EINVAL; > vcpu->kvm->arch.psci_version = val; > diff --git a/arch/arm64/kvm/psci.c b/arch/arm64/kvm/psci.c > index fd0f82464f7d..5177dda5a411 100644 > --- a/arch/arm64/kvm/psci.c > +++ b/arch/arm64/kvm/psci.c > @@ -328,7 +328,7 @@ static int kvm_psci_1_x_call(struct kvm_vcpu *vcpu, u32 minor) > > switch(psci_fn) { > case PSCI_0_2_FN_PSCI_VERSION: > - val = minor == 0 ? KVM_ARM_PSCI_1_0 : KVM_ARM_PSCI_1_1; > + val = PSCI_VERSION(1, minor); > break; > case PSCI_1_0_FN_PSCI_FEATURES: > arg = smccc_get_arg1(vcpu); > @@ -486,6 +486,10 @@ int kvm_psci_call(struct kvm_vcpu *vcpu) > } > > switch (version) { > + case KVM_ARM_PSCI_1_3: > + return kvm_psci_1_x_call(vcpu, 3); > + case KVM_ARM_PSCI_1_2: > + return kvm_psci_1_x_call(vcpu, 2); > case KVM_ARM_PSCI_1_1: > return kvm_psci_1_x_call(vcpu, 1); > case KVM_ARM_PSCI_1_0: > diff --git a/include/kvm/arm_psci.h b/include/kvm/arm_psci.h > index e8fb624013d1..cbaec804eb83 100644 > --- a/include/kvm/arm_psci.h > +++ b/include/kvm/arm_psci.h > @@ -14,8 +14,10 @@ > #define KVM_ARM_PSCI_0_2 PSCI_VERSION(0, 2) > #define KVM_ARM_PSCI_1_0 PSCI_VERSION(1, 0) > #define KVM_ARM_PSCI_1_1 PSCI_VERSION(1, 1) > +#define KVM_ARM_PSCI_1_2 PSCI_VERSION(1, 2) > +#define KVM_ARM_PSCI_1_3 PSCI_VERSION(1, 3) > > -#define KVM_ARM_PSCI_LATEST KVM_ARM_PSCI_1_1 > +#define KVM_ARM_PSCI_LATEST KVM_ARM_PSCI_1_3 > > static inline int kvm_psci_version(struct kvm_vcpu *vcpu) > { > -- > 2.44.0 > -- Thanks, Oliver