linux-headers: Update to include KVM_CAP_PPC_COMPAT_CAPS
PATCH 1/1 linux-headers: Update to include KVM_CAP_PPC_COMPAT_CAPS
Sync linux headers from Linux kernel commit 1200d84f4c0a
("Merge tag 'powerpc-7.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux").
This picks up the new KVM_CAP_PPC_COMPAT_CAPS capability for powerpc, which introduces:
- struct kvm_ppc_compat_caps: reports processor compatibility modes supported by the host (POWER9, POWER10, POWER11)
- KVM_PPC_GET_COMPAT_CAPS ioctl (KVMIO 0xb8)
- KVM_CAP_PPC_COMPAT_CAPS (cap #250) in linux/kvm.h
The sync is needed to get the corresponding Qemu series[1] merged.
[1]: https://lore.kernel.org/all/[email protected]/
--- include/standard-headers/linux/const.h | 4 ++-- linux-headers/asm-arm64/unistd_64.h | 1 + linux-headers/asm-generic/unistd.h | 6 +++++- linux-headers/asm-loongarch/unistd_64.h | 1 + linux-headers/asm-mips/unistd_n32.h | 1 + linux-headers/asm-mips/unistd_n64.h | 1 + linux-headers/asm-mips/unistd_o32.h | 1 + linux-headers/asm-powerpc/kvm.h | 18 ++++++++++++++++++ linux-headers/asm-powerpc/unistd_32.h | 1 + linux-headers/asm-powerpc/unistd_64.h | 1 + linux-headers/asm-riscv/unistd_32.h | 1 + linux-headers/asm-riscv/unistd_64.h | 1 + linux-headers/asm-s390/unistd_64.h | 1 + linux-headers/asm-x86/unistd_32.h | 1 + linux-headers/asm-x86/unistd_64.h | 1 + linux-headers/asm-x86/unistd_x32.h | 1 + linux-headers/linux/const.h | 4 ++-- linux-headers/linux/kvm.h | 3 +++ 18 files changed, 43 insertions(+), 5 deletions(-)
include/standard-headers/linux/const.h +2 -2
@@ -13,7 +13,7 @@* leave it unchanged in asm. */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define _AC (X ,Y ) X#define _AT (T ,X ) X#else
@@ -28,7 +28,7 @@#define _BITUL (x) (_UL(1) << (x))#define _BITULL (x) (_ULL(1) << (x)) -#if !defined(__ASSEMBLY__) +#if !defined(__ASSEMBLER__)/* * Missing __asm__ support *
linux-headers/asm-arm64/unistd_64.h +1 -0
@@ -328,6 +328,7 @@#define __NR_file_setattr 469#define __NR_listns 470#define __NR_rseq_slice_yield 471 +#define __NR_fchroot 472#endif /* _ASM_UNISTD_64_H */
linux-headers/asm-generic/unistd.h +5 -1
@@ -863,8 +863,12 @@ __SYSCALL(__NR_listns, sys_listns)#define __NR_rseq_slice_yield 471__SYSCALL (__NR_rseq_slice_yield, sys_rseq_slice_yield) +/* fs/open.c */ +#define __NR_fchroot 472 +__SYSCALL(__NR_fchroot, sys_fchroot) +#undef __NR_syscalls -#define __NR_syscalls 472 +#define __NR_syscalls 473/* * 32 bit systems traditionally used different
linux-headers/asm-loongarch/unistd_64.h +1 -0
@@ -325,6 +325,7 @@#define __NR_file_setattr 469#define __NR_listns 470#define __NR_rseq_slice_yield 471 +#define __NR_fchroot 472#endif /* _ASM_UNISTD_64_H */
linux-headers/asm-mips/unistd_n32.h +1 -0
@@ -400,5 +400,6 @@#define __NR_file_setattr (__NR_Linux + 469)#define __NR_listns (__NR_Linux + 470)#define __NR_rseq_slice_yield (__NR_Linux + 471) +#define __NR_fchroot (__NR_Linux + 472)#endif /* _ASM_UNISTD_N32_H */
linux-headers/asm-mips/unistd_n64.h +1 -0
@@ -376,5 +376,6 @@#define __NR_file_setattr (__NR_Linux + 469)#define __NR_listns (__NR_Linux + 470)#define __NR_rseq_slice_yield (__NR_Linux + 471) +#define __NR_fchroot (__NR_Linux + 472)#endif /* _ASM_UNISTD_N64_H */
linux-headers/asm-mips/unistd_o32.h +1 -0
@@ -446,5 +446,6 @@#define __NR_file_setattr (__NR_Linux + 469)#define __NR_listns (__NR_Linux + 470)#define __NR_rseq_slice_yield (__NR_Linux + 471) +#define __NR_fchroot (__NR_Linux + 472)#endif /* _ASM_UNISTD_O32_H */
linux-headers/asm-powerpc/kvm.h +18 -0
@@ -437,6 +437,24 @@ 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.
linux-headers/asm-powerpc/unistd_32.h +1 -0
@@ -453,6 +453,7 @@#define __NR_file_setattr 469#define __NR_listns 470#define __NR_rseq_slice_yield 471 +#define __NR_fchroot 472#endif /* _ASM_UNISTD_32_H */
linux-headers/asm-powerpc/unistd_64.h +1 -0
@@ -425,6 +425,7 @@#define __NR_file_setattr 469#define __NR_listns 470#define __NR_rseq_slice_yield 471 +#define __NR_fchroot 472#endif /* _ASM_UNISTD_64_H */
linux-headers/asm-riscv/unistd_32.h +1 -0
@@ -319,6 +319,7 @@#define __NR_file_setattr 469#define __NR_listns 470#define __NR_rseq_slice_yield 471 +#define __NR_fchroot 472#endif /* _ASM_UNISTD_32_H */
linux-headers/asm-riscv/unistd_64.h +1 -0
@@ -329,6 +329,7 @@#define __NR_file_setattr 469#define __NR_listns 470#define __NR_rseq_slice_yield 471 +#define __NR_fchroot 472#endif /* _ASM_UNISTD_64_H */
linux-headers/asm-s390/unistd_64.h +1 -0
@@ -391,6 +391,7 @@#define __NR_file_setattr 469#define __NR_listns 470#define __NR_rseq_slice_yield 471 +#define __NR_fchroot 472#endif /* _ASM_UNISTD_64_H */
linux-headers/asm-x86/unistd_32.h +1 -0
@@ -462,6 +462,7 @@#define __NR_file_setattr 469#define __NR_listns 470#define __NR_rseq_slice_yield 471 +#define __NR_fchroot 472#endif /* _ASM_UNISTD_32_H */
linux-headers/asm-x86/unistd_64.h +1 -0
@@ -386,6 +386,7 @@#define __NR_file_setattr 469#define __NR_listns 470#define __NR_rseq_slice_yield 471 +#define __NR_fchroot 472#endif /* _ASM_UNISTD_64_H */
linux-headers/asm-x86/unistd_x32.h +1 -0
@@ -339,6 +339,7 @@#define __NR_file_setattr (__X32_SYSCALL_BIT + 469)#define __NR_listns (__X32_SYSCALL_BIT + 470)#define __NR_rseq_slice_yield (__X32_SYSCALL_BIT + 471) +#define __NR_fchroot (__X32_SYSCALL_BIT + 472)#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)#define __NR_ioctl (__X32_SYSCALL_BIT + 514)
linux-headers/linux/const.h +2 -2
@@ -13,7 +13,7 @@* leave it unchanged in asm. */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define _AC (X ,Y ) X#define _AT (T ,X ) X#else
@@ -28,7 +28,7 @@#define _BITUL (x) (_UL(1) << (x))#define _BITULL (x) (_ULL(1) << (x)) -#if !defined(__ASSEMBLY__) +#if !defined(__ASSEMBLER__)/* * Missing __asm__ support *
linux-headers/linux/kvm.h +3 -0
@@ -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 250struct 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)
base-commit: fa19879df1658f96ac07365fca8835b7decd6995
Signature · 1 line
2.50.1 (Apple Git-155)
Hi Cornelia,
Will you be picking it up sometime soon or shall I fold in with respective qemu patches depending on it? Please let me know. TIA.
regards,
Harsh
Quoted 303 lines · Amit Machhiwal
Sync linux headers from Linux kernel commit
1200d84f4c0a
("Merge tag 'powerpc-7.3-1' ofgit://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux").This picks up the new
KVM_CAP_PPC_COMPAT_CAPScapability for powerpc, which introduces:
- structkvm_ppc_compat_caps: reports processor compatibility modes supported by the host (POWER9, POWER10, POWER11)
-KVM_PPC_GET_COMPAT_CAPSioctl (KVMIO0xb8)
-KVM_CAP_PPC_COMPAT_CAPS(cap #250) inlinux/kvm.hThe sync is needed to get the corresponding Qemu series[1] merged.
[1]: https://lore.kernel.org/all/[email protected]/
Signed-off-by Amit Machhiwal <[email protected]>--- include/standard-headers/linux/const.h | 4 ++-- linux-headers/asm-arm64/unistd_64.h | 1 + linux-headers/asm-generic/unistd.h | 6 +++++- linux-headers/asm-loongarch/unistd_64.h | 1 + linux-headers/asm-mips/unistd_n32.h | 1 + linux-headers/asm-mips/unistd_n64.h | 1 + linux-headers/asm-mips/unistd_o32.h | 1 + linux-headers/asm-powerpc/kvm.h | 18 ++++++++++++++++++ linux-headers/asm-powerpc/unistd_32.h | 1 + linux-headers/asm-powerpc/unistd_64.h | 1 + linux-headers/asm-riscv/unistd_32.h | 1 + linux-headers/asm-riscv/unistd_64.h | 1 + linux-headers/asm-s390/unistd_64.h | 1 + linux-headers/asm-x86/unistd_32.h | 1 + linux-headers/asm-x86/unistd_64.h | 1 + linux-headers/asm-x86/unistd_x32.h | 1 + linux-headers/linux/const.h | 4 ++-- linux-headers/linux/kvm.h | 3 +++ 18 files changed, 43 insertions(+), 5 deletions(-)include/standard-headers/linux/const.h +2
-2@@ -13,7 +13,7 @@* leave it unchanged in asm. */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define _AC (X ,Y ) X#define _AT (T ,X ) X#else @@ -28,7 +28,7 @@#define _BITUL (x) (_UL(1) << (x))#define _BITULL (x) (_ULL(1) << (x)) -#if !defined(__ASSEMBLY__) +#if !defined(__ASSEMBLER__)/* * Missing __asm__ support * linux-headers/asm-arm64/unistd_64.h +1
-0@@ -328,6 +328,7 @@#define __NR_file_setattr 469#define __NR_listns 470#define __NR_rseq_slice_yield 471 +#define __NR_fchroot 472#endif /* _ASM_UNISTD_64_H */ linux-headers/asm-generic/unistd.h +5
-1@@ -863,8 +863,12 @@ __SYSCALL(__NR_listns, sys_listns)#define __NR_rseq_slice_yield 471__SYSCALL (__NR_rseq_slice_yield, sys_rseq_slice_yield) +/* fs/open.c */ +#define __NR_fchroot 472 +__SYSCALL(__NR_fchroot, sys_fchroot) +#undef __NR_syscalls -#define __NR_syscalls 472 +#define __NR_syscalls 473/* * 32 bit systems traditionally used different linux-headers/asm-loongarch/unistd_64.h +1
-0@@ -325,6 +325,7 @@#define __NR_file_setattr 469#define __NR_listns 470#define __NR_rseq_slice_yield 471 +#define __NR_fchroot 472#endif /* _ASM_UNISTD_64_H */ linux-headers/asm-mips/unistd_n32.h +1
-0@@ -400,5 +400,6 @@#define __NR_file_setattr (__NR_Linux + 469)#define __NR_listns (__NR_Linux + 470)#define __NR_rseq_slice_yield (__NR_Linux + 471) +#define __NR_fchroot (__NR_Linux + 472)#endif /* _ASM_UNISTD_N32_H */ linux-headers/asm-mips/unistd_n64.h +1
-0@@ -376,5 +376,6 @@#define __NR_file_setattr (__NR_Linux + 469)#define __NR_listns (__NR_Linux + 470)#define __NR_rseq_slice_yield (__NR_Linux + 471) +#define __NR_fchroot (__NR_Linux + 472)#endif /* _ASM_UNISTD_N64_H */ linux-headers/asm-mips/unistd_o32.h +1
-0@@ -446,5 +446,6 @@#define __NR_file_setattr (__NR_Linux + 469)#define __NR_listns (__NR_Linux + 470)#define __NR_rseq_slice_yield (__NR_Linux + 471) +#define __NR_fchroot (__NR_Linux + 472)#endif /* _ASM_UNISTD_O32_H */ linux-headers/asm-powerpc/kvm.h +18
-0@@ -437,6 +437,24 @@ 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. linux-headers/asm-powerpc/unistd_32.h +1
-0@@ -453,6 +453,7 @@#define __NR_file_setattr 469#define __NR_listns 470#define __NR_rseq_slice_yield 471 +#define __NR_fchroot 472#endif /* _ASM_UNISTD_32_H */ linux-headers/asm-powerpc/unistd_64.h +1
-0@@ -425,6 +425,7 @@#define __NR_file_setattr 469#define __NR_listns 470#define __NR_rseq_slice_yield 471 +#define __NR_fchroot 472#endif /* _ASM_UNISTD_64_H */ linux-headers/asm-riscv/unistd_32.h +1
-0@@ -319,6 +319,7 @@#define __NR_file_setattr 469#define __NR_listns 470#define __NR_rseq_slice_yield 471 +#define __NR_fchroot 472#endif /* _ASM_UNISTD_32_H */ linux-headers/asm-riscv/unistd_64.h +1
-0@@ -329,6 +329,7 @@#define __NR_file_setattr 469#define __NR_listns 470#define __NR_rseq_slice_yield 471 +#define __NR_fchroot 472#endif /* _ASM_UNISTD_64_H */ linux-headers/asm-s390/unistd_64.h +1
-0@@ -391,6 +391,7 @@#define __NR_file_setattr 469#define __NR_listns 470#define __NR_rseq_slice_yield 471 +#define __NR_fchroot 472#endif /* _ASM_UNISTD_64_H */ linux-headers/asm-x86/unistd_32.h +1
-0@@ -462,6 +462,7 @@#define __NR_file_setattr 469#define __NR_listns 470#define __NR_rseq_slice_yield 471 +#define __NR_fchroot 472#endif /* _ASM_UNISTD_32_H */ linux-headers/asm-x86/unistd_64.h +1
-0@@ -386,6 +386,7 @@#define __NR_file_setattr 469#define __NR_listns 470#define __NR_rseq_slice_yield 471 +#define __NR_fchroot 472#endif /* _ASM_UNISTD_64_H */ linux-headers/asm-x86/unistd_x32.h +1
-0@@ -339,6 +339,7 @@#define __NR_file_setattr (__X32_SYSCALL_BIT + 469)#define __NR_listns (__X32_SYSCALL_BIT + 470)#define __NR_rseq_slice_yield (__X32_SYSCALL_BIT + 471) +#define __NR_fchroot (__X32_SYSCALL_BIT + 472)#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)#define __NR_ioctl (__X32_SYSCALL_BIT + 514)linux-headers/linux/const.h +2
-2@@ -13,7 +13,7 @@* leave it unchanged in asm. */ -#ifdef __ASSEMBLY__ +#ifdef __ASSEMBLER__#define _AC (X ,Y ) X#define _AT (T ,X ) X#else @@ -28,7 +28,7 @@#define _BITUL (x) (_UL(1) << (x))#define _BITULL (x) (_ULL(1) << (x)) -#if !defined(__ASSEMBLY__) +#if !defined(__ASSEMBLER__)/* * Missing __asm__ support * linux-headers/linux/kvm.h +3
-0@@ -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 250struct 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)base-commit:
fa19879df1658f96ac07365fca8835b7decd6995
Quoted 4 lines · Harsh Prateek Bora
Hi Cornelia,
Will you be picking it up sometime soon or shall I fold in with respective qemu patches depending on it? Please let me know. TIA.
For headers updates, the usual process is to simply include them with the series making use of the updates, so please just send them together with your series.
Quoted 10 lines · Cornelia Huck
Quoted 4 lines · Harsh Prateek Bora
Hi Cornelia,
Will you be picking it up sometime soon or shall I fold in with respective qemu patches depending on it? Please let me know. TIA.
For headers updates, the usual process is to simply include them with the series making use of the updates, so please just send them together with your series.
Sure, I will include it in my next PR then. Thanks!
Quoted 27 lines · Amit Machhiwal
Sync linux headers from Linux kernel commit
1200d84f4c0a
("Merge tag 'powerpc-7.3-1' ofgit://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux").This picks up the new
KVM_CAP_PPC_COMPAT_CAPScapability for powerpc, which introduces:
- structkvm_ppc_compat_caps: reports processor compatibility modes supported by the host (POWER9, POWER10, POWER11)
-KVM_PPC_GET_COMPAT_CAPSioctl (KVMIO0xb8)
-KVM_CAP_PPC_COMPAT_CAPS(cap #250) inlinux/kvm.hThe sync is needed to get the corresponding Qemu series[1] merged.
[1]: https://lore.kernel.org/all/[email protected]/
Signed-off-by Amit Machhiwal <[email protected]>--- include/standard-headers/linux/const.h | 4 ++-- linux-headers/asm-arm64/unistd_64.h | 1 + linux-headers/asm-generic/unistd.h | 6 +++++- linux-headers/asm-loongarch/unistd_64.h | 1 + linux-headers/asm-mips/unistd_n32.h | 1 + linux-headers/asm-mips/unistd_n64.h | 1 + linux-headers/asm-mips/unistd_o32.h | 1 + linux-headers/asm-powerpc/kvm.h | 18 ++++++++++++++++++ linux-headers/asm-powerpc/unistd_32.h | 1 + linux-headers/asm-powerpc/unistd_64.h | 1 + linux-headers/asm-riscv/unistd_32.h | 1 +
Quoted 9 lines
linux-headers/asm-riscv/unistd_64.h | 1 + linux-headers/asm-s390/unistd_64.h | 1 + linux-headers/asm-x86/unistd_32.h | 1 + linux-headers/asm-x86/unistd_64.h | 1 + linux-headers/asm-x86/unistd_x32.h | 1 + linux-headers/linux/const.h | 4 ++-- linux-headers/linux/kvm.h | 3 +++ 18 files changed, 43 insertions(+), 5 deletions(-)
CI link: https://gitlab.com/amachhiw/qemu/-/pipelines/2784536213 (Passed)
Thanks,
Amit