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 792FAC83F25 for ; Mon, 21 Jul 2025 16:59:05 +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:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID: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=2a3QVizvyoU1rYtdk8iaK9TFM+BY6q0gphveCHFktlI=; b=wAe9U0t63llDFeXyeO2SKGp3LB G8YcXv+hrpTr5YMdrGSXf7+CrCtqcMu9KF2goFmHpMVP9erk/FJGNzVW0eSDdwCFKW3RqI9A4hk9B STBRZdpBt4UvXD7vYQU/uswgI+oQH7UtFY34v78VPJ8Itcl8Fmp/Yx3/UUa6tnzegvtX6UYHHlDbU z+cL04KO73J1aLXa4Bi3rwvId7SculKXDFS2r3P9ha1kV/j8x87ulJ2ECGk+s7JoFbGUr6Z5kAUM2 xT5I86b1koqh5dV5c0kmHAMCp9rxYoBbHzXKe6BhYAV8fXlM1SXW5PPUWOSluecfkZeXVoQVmYAar MX7rNVEA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1udtqt-00000000GQQ-2gPC; Mon, 21 Jul 2025 16:58:59 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1udsvT-000000008g5-3USu for linux-arm-kernel@lists.infradead.org; Mon, 21 Jul 2025 15:59:41 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 3E5DF5C622D; Mon, 21 Jul 2025 15:59:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4414C4CEED; Mon, 21 Jul 2025 15:59:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753113578; bh=Lf+4RT6jGk5ZpNNApLCEK/aUp80m/GUhV1ehwC8FCeI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=St9cVnD8v5yoaod05XQDQsHZOW7dyXgE3NSBuWzFHagmCg2MCcpap/3YFBkQNbCJJ AwqotXRjVRHOmZuDIwaWiyYcrQWhxlXvJ3lfAyV3+6A4vTPZaxUQc+ttOxh6PNxMUU zPyyQKpOs/eqlYRlbxIkXlSybZbSECYkvVkJzZg6uY2lS+bzcrxM80NB0gaQnp9YQk 47qPOk7GKWmcLh+tc7B8eCx85JTA4zUZbnhgsdgziDvQGQbbAcVOvncHWfhdPRxluW 95692scELV++ZwkoJoj6AogoIwB73+zehjt/G55cNDgvggrT/ioC6ndSyayoaxwGW0 pZYJA9UvAaqNQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1udsvQ-0004MP-Iy; Mon, 21 Jul 2025 16:59:36 +0100 Date: Mon, 21 Jul 2025 16:59:36 +0100 Message-ID: <86jz418rh3.wl-maz@kernel.org> From: Marc Zyngier To: Jack Thomson , Will Deacon Cc: mark.rutland@arm.com, lpieralisi@kernel.org, sudeep.holla@arm.com, arnd@arndb.de, wei.liu@kernel.org, romank@linux.microsoft.com, mhklinux@outlook.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, oliver.upton@linux.dev, kvmarm@lists.linux.dev, roypat@amazon.com, Jack Thomson Subject: Re: [PATCH] arm64: kvm, smccc: Fix vendor uuid In-Reply-To: <20250721130558.50823-1-jackabt.amazon@gmail.com> References: <20250721130558.50823-1-jackabt.amazon@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: jackabt.amazon@gmail.com, will@kernel.org, mark.rutland@arm.com, lpieralisi@kernel.org, sudeep.holla@arm.com, arnd@arndb.de, wei.liu@kernel.org, romank@linux.microsoft.com, mhklinux@outlook.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, oliver.upton@linux.dev, kvmarm@lists.linux.dev, roypat@amazon.com, jackabt@amazon.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250721_085939_948394_604EA49C X-CRM114-Status: GOOD ( 24.34 ) 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 [+Will] On Mon, 21 Jul 2025 14:05:58 +0100, Jack Thomson wrote: > > From: Jack Thomson > > Commit 13423063c7cb ("arm64: kvm, smccc: Introduce and use API for > getting hypervisor UUID") replaced the explicit register constants > with the UUID_INIT macro. However, there is an endian issue, meaning > the UUID generated and used in the handshake didn't match UUID prior to > the commit. > > The change in UUID causes the SMCCC vendor handshake to fail with older > guest kernels, meaning devices such as PTP were not available in the > guest. > > This patch updates the parameters to the macro to generate a UUID which > matches the previous value, and re-establish backwards compatibility > with older guest kernels. > > Fixes: 13423063c7cb ("arm64: kvm, smccc: Introduce and use API for getting hypervisor UUID") > getting hypervisor UUID") > Signed-off-by: Jack Thomson > --- > include/linux/arm-smccc.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h > index 784ebe4607a4..50b47eba7d01 100644 > --- a/include/linux/arm-smccc.h > +++ b/include/linux/arm-smccc.h > @@ -113,7 +113,7 @@ > > /* KVM UID value: 28b46fb6-2ec5-11e9-a9ca-4b564d003a74 */ > #define ARM_SMCCC_VENDOR_HYP_UID_KVM UUID_INIT(\ > - 0xb66fb428, 0xc52e, 0xe911, \ > + 0x28b46fb6, 0x2ec5, 0x11e9, \ > 0xa9, 0xca, 0x4b, 0x56, \ > 0x4d, 0x00, 0x3a, 0x74) > > Irk. This is remarkably embarrassing, and needs to be addressed ASAP, before 6.16 ships. FWIW, I've just posted a quickly whipped selftest that shows the problem[1]. Will, is there a chance you can pick this up and ferry it to Linus? If you do, please add: Reviewed-by: Marc Zyngier Tested-by: Marc Zyngier Thanks, M. [1] https://lore.kernel.org/r/20250721155136.892255-1-maz@kernel.org -- Without deviation from the norm, progress is not possible.