Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Jack Thomson <jackabt.amazon@gmail.com>, Will Deacon <will@kernel.org>
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 <jackabt@amazon.com>
Subject: Re: [PATCH] arm64: kvm, smccc: Fix vendor uuid
Date: Mon, 21 Jul 2025 16:59:36 +0100	[thread overview]
Message-ID: <86jz418rh3.wl-maz@kernel.org> (raw)
In-Reply-To: <20250721130558.50823-1-jackabt.amazon@gmail.com>

[+Will]

On Mon, 21 Jul 2025 14:05:58 +0100,
Jack Thomson <jackabt.amazon@gmail.com> wrote:
> 
> From: Jack Thomson <jackabt@amazon.com>
> 
> 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 <jackabt@amazon.com>
> ---
>  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 <maz@kernel.org>
Tested-by: Marc Zyngier <maz@kernel.org>

Thanks,

	M.

[1] https://lore.kernel.org/r/20250721155136.892255-1-maz@kernel.org

-- 
Without deviation from the norm, progress is not possible.


  reply	other threads:[~2025-07-21 16:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-21 13:05 [PATCH] arm64: kvm, smccc: Fix vendor uuid Jack Thomson
2025-07-21 15:59 ` Marc Zyngier [this message]
2025-07-21 17:14   ` Will Deacon
2025-07-21 17:27     ` Roman Kisel
2025-07-21 16:15 ` Sudeep Holla
2025-07-21 17:20   ` Roman Kisel
2025-07-21 17:45 ` Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86jz418rh3.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=arnd@arndb.de \
    --cc=jackabt.amazon@gmail.com \
    --cc=jackabt@amazon.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mhklinux@outlook.com \
    --cc=oliver.upton@linux.dev \
    --cc=romank@linux.microsoft.com \
    --cc=roypat@amazon.com \
    --cc=sudeep.holla@arm.com \
    --cc=wei.liu@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox