[kvmtool PATCH v5 02/15] update_headers: arm64: Track psci.h for PSCI definitions

Suzuki K Poulose posted 15 patches 1 month ago
[kvmtool PATCH v5 02/15] update_headers: arm64: Track psci.h for PSCI definitions
Posted by Suzuki K Poulose 1 month ago
Track UAPI psci.h for PSCI definitions

Reviewed-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
 util/update_headers.sh | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/util/update_headers.sh b/util/update_headers.sh
index af75ca36..9fe782a2 100755
--- a/util/update_headers.sh
+++ b/util/update_headers.sh
@@ -37,13 +37,16 @@ done
 
 unset KVMTOOL_PATH
 
-copy_optional_arch () {
-	local src="$LINUX_ROOT/arch/$arch/include/uapi/$1"
+copy_arm64_headers () {
+	local uapi_asm_hdr="$LINUX_ROOT/arch/$arch/include/uapi/asm"
 
-	if [ -r "$src" ]
-	then
-		cp -- "$src" "$KVMTOOL_PATH/include/asm/"
-	fi
+	for f in sve_context.h psci.h
+	do
+		if [ -r "$uapi_asm_hdr/$f" ]
+		then
+			cp -- "$uapi_asm_hdr/$f" "$KVMTOOL_PATH/include/asm/"
+		fi
+	done
 }
 
 for arch in arm64 mips powerpc riscv x86
@@ -51,7 +54,7 @@ do
 	KVMTOOL_PATH=$arch
 
 	case $arch in
-		arm64) copy_optional_arch asm/sve_context.h ;;
+		arm64) copy_arm64_headers;;
 	esac
 	cp -- "$LINUX_ROOT/arch/$arch/include/uapi/asm/kvm.h" \
 		"$KVMTOOL_PATH/include/asm"
-- 
2.43.0
Re: [kvmtool PATCH v5 02/15] update_headers: arm64: Track psci.h for PSCI definitions
Posted by Will Deacon an hour ago
On Thu, Jan 08, 2026 at 05:57:40PM +0000, Suzuki K Poulose wrote:
> Track UAPI psci.h for PSCI definitions
> 
> Reviewed-by: Marc Zyngier <maz@kernel.org>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
>  util/update_headers.sh | 17 ++++++++++-------
>  1 file changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/util/update_headers.sh b/util/update_headers.sh
> index af75ca36..9fe782a2 100755
> --- a/util/update_headers.sh
> +++ b/util/update_headers.sh
> @@ -37,13 +37,16 @@ done
>  
>  unset KVMTOOL_PATH
>  
> -copy_optional_arch () {
> -	local src="$LINUX_ROOT/arch/$arch/include/uapi/$1"
> +copy_arm64_headers () {
> +	local uapi_asm_hdr="$LINUX_ROOT/arch/$arch/include/uapi/asm"
>  
> -	if [ -r "$src" ]
> -	then
> -		cp -- "$src" "$KVMTOOL_PATH/include/asm/"
> -	fi
> +	for f in sve_context.h psci.h
> +	do
> +		if [ -r "$uapi_asm_hdr/$f" ]
> +		then
> +			cp -- "$uapi_asm_hdr/$f" "$KVMTOOL_PATH/include/asm/"
> +		fi
> +	done

This doesn't make sense to me as I don't think we've ever had an
arm64 uapi/asm/psci.h. You presumably want linux/psci.h (which is what
the next patch pulls in), but then I don't understand how that worked
with the change you've got here :/

For now, I'll apply the first patch and then update the headers to 6.19
myself using the current script (as other folks need them updating too).

Will