Re: [PATCH v6 1/3] [DO_NOT_MERGE] linux-headers: Add uapi header changes

Michal Suchánek <[email protected]>
Newsgroups org.kernel.vger.kvm,org.nongnu.qemu-devel
Message-ID <[email protected]>
Hello,

some version of the kernel patches seems to be merged in the powerpc
tree now.

Cant his be merged now or is a refresh required?

Thanks

Michal

On Wed, Aug 12, 2026 at 10:38:52PM +0530, Amit Machhiwal wrote:
> This is a temporary patch intended for review and testing purposes only.
> It syncs the QEMU linux-headers with the kernel v9 changes that introduce
> the KVM_PPC_GET_COMPAT_CAPS ioctl for querying host CPU compatibility
> capabilities. The struct kvm_ppc_compat_caps places 'size' as the first
> field as required by copy_struct_from/to_user() versioning, with
> KVM_PPC_COMPAT_CAPS_SIZE_VER0 (24) defined as the frozen version-floor
> constant. The capability number is KVM_CAP_PPC_COMPAT_CAPS (250) and
> the ioctl is defined as _IO so the ioctl number remains stable if the
> struct grows in future versions. Capability bit definitions for POWER9,
> POWER10, and POWER11 compatibility modes are also included.
> 
> The actual header sync will be done via scripts/update-linux-headers.sh
> once the kernel changes [1] are merged upstream.
> 
> [1] https://lore.kernel.org/all/[email protected]/
> 
> Tested-by: Gautam Menghani <[email protected]>
> Reviewed-by: Gautam Menghani <[email protected]>
> Tested-by: Anushree Mathur <[email protected]>
> Signed-off-by: Amit Machhiwal <[email protected]>
> ---
> No changes in this version.
> 
>  linux-headers/asm-powerpc/kvm.h | 19 +++++++++++++++++++
>  linux-headers/linux/kvm.h       |  3 +++
>  2 files changed, 22 insertions(+)
> 
> diff --git a/linux-headers/asm-powerpc/kvm.h b/linux-headers/asm-powerpc/kvm.h
> index 077c5437f521..2c229fe0562c 100644
> --- a/linux-headers/asm-powerpc/kvm.h
> +++ b/linux-headers/asm-powerpc/kvm.h
> @@ -437,6 +437,25 @@ struct kvm_ppc_cpu_char {
>  	__u64	behaviour_mask;		/* valid bits in behaviour */
>  };
>  
> +/* For KVM_PPC_GET_COMPAT_CAPS */
> +struct kvm_ppc_compat_caps {
> +	__u64	size;			/* Size of this structure */
> +	__u64	flags;			/* Reserved for future use */
> +	__u64	compat_capabilities;	/* Capabilities supported by the host */
> +};
> +#define KVM_PPC_COMPAT_CAPS_SIZE_VER0	24 /* sizeof first published struct */
> +
> +/*
> + * Capability bits for compat_capabilities field in kvm_ppc_compat_caps.
> + * These bits indicate which processor compatibility modes are supported.
> + */
> +#define KVM_PPC_COMPAT_CAP_POWER9	(1ULL << 62)
> +#define KVM_PPC_COMPAT_CAP_POWER10	(1ULL << 61)
> +#define KVM_PPC_COMPAT_CAP_POWER11	(1ULL << 60)
> +#define KVM_PPC_COMPAT_BITMASK		(KVM_PPC_COMPAT_CAP_POWER9 | \
> +					 KVM_PPC_COMPAT_CAP_POWER10 | \
> +					 KVM_PPC_COMPAT_CAP_POWER11)
> +
>  /*
>   * Values for character and character_mask.
>   * These are identical to the values used by H_GET_CPU_CHARACTERISTICS.
> diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
> index dd52e2a65bfd..aea4ab5c6953 100644
> --- a/linux-headers/linux/kvm.h
> +++ b/linux-headers/linux/kvm.h
> @@ -986,6 +986,7 @@ struct kvm_enable_cap {
>  #define KVM_CAP_S390_KEYOP 247
>  #define KVM_CAP_S390_VSIE_ESAMODE 248
>  #define KVM_CAP_S390_HPAGE_2G 249
> +#define KVM_CAP_PPC_COMPAT_CAPS 250
>  
>  struct kvm_irq_routing_irqchip {
>  	__u32 irqchip;
> @@ -1330,6 +1331,8 @@ struct kvm_s390_keyop {
>  /* Available with KVM_CAP_COUNTER_OFFSET */
>  #define KVM_ARM_SET_COUNTER_OFFSET _IOW(KVMIO,  0xb5, struct kvm_arm_counter_offset)
>  #define KVM_ARM_GET_REG_WRITABLE_MASKS _IOR(KVMIO,  0xb6, struct reg_mask_range)
> +/* Available with KVM_CAP_PPC_COMPAT_CAPS */
> +#define KVM_PPC_GET_COMPAT_CAPS	_IO(KVMIO,  0xb8)
>  
>  /* ioctl for vm fd */
>  #define KVM_CREATE_DEVICE	  _IOWR(KVMIO,  0xe0, struct kvm_create_device)
> -- 
> 2.50.1 (Apple Git-155)
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.