@samitouri / QOSamiQemu / commits / 2a15a5d2f2

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/20260812170854.58709-1-amachhiw@linux.ibm.com/ Signed-off-by: Amit Machhiwal <amachhiw@linux.ibm.com> Link: https://lore.kernel.org/qemu-devel/20260819045924.11732-1-amachhiw@linux.ibm.com Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>

Amit Machhiwal committed Aug 19, 2026 at 10:29 UTC 2a15a5d2f2378858af0dbbd03a397cf9f093f905
18 files changed +43 -5
include/standard-headers/linux/const.h
+2 -2
@@ -13,7 +13,7 @@
13 * leave it unchanged in asm.
14 */
15
16 -#ifdef __ASSEMBLY__
16 +#ifdef __ASSEMBLER__
17 #define _AC(X,Y) X
18 #define _AT(T,X) X
19 #else
@@ -28,7 +28,7 @@
28 #define _BITUL(x) (_UL(1) << (x))
29 #define _BITULL(x) (_ULL(1) << (x))
30
31 -#if !defined(__ASSEMBLY__)
31 +#if !defined(__ASSEMBLER__)
32 /*
33 * Missing __asm__ support
34 *
linux-headers/asm-arm64/unistd_64.h
+1
@@ -328,6 +328,7 @@
328 #define __NR_file_setattr 469
329 #define __NR_listns 470
330 #define __NR_rseq_slice_yield 471
331 +#define __NR_fchroot 472
332
333
334 #endif /* _ASM_UNISTD_64_H */
linux-headers/asm-generic/unistd.h
+5 -1
@@ -863,8 +863,12 @@ __SYSCALL(__NR_listns, sys_listns)
863 #define __NR_rseq_slice_yield 471
864 __SYSCALL(__NR_rseq_slice_yield, sys_rseq_slice_yield)
865
866 +/* fs/open.c */
867 +#define __NR_fchroot 472
868 +__SYSCALL(__NR_fchroot, sys_fchroot)
869 +
870 #undef __NR_syscalls
867 -#define __NR_syscalls 472
871 +#define __NR_syscalls 473
872
873 /*
874 * 32 bit systems traditionally used different
linux-headers/asm-loongarch/unistd_64.h
+1
@@ -325,6 +325,7 @@
325 #define __NR_file_setattr 469
326 #define __NR_listns 470
327 #define __NR_rseq_slice_yield 471
328 +#define __NR_fchroot 472
329
330
331 #endif /* _ASM_UNISTD_64_H */
linux-headers/asm-mips/unistd_n32.h
+1
@@ -400,5 +400,6 @@
400 #define __NR_file_setattr (__NR_Linux + 469)
401 #define __NR_listns (__NR_Linux + 470)
402 #define __NR_rseq_slice_yield (__NR_Linux + 471)
403 +#define __NR_fchroot (__NR_Linux + 472)
404
405 #endif /* _ASM_UNISTD_N32_H */
linux-headers/asm-mips/unistd_n64.h
+1
@@ -376,5 +376,6 @@
376 #define __NR_file_setattr (__NR_Linux + 469)
377 #define __NR_listns (__NR_Linux + 470)
378 #define __NR_rseq_slice_yield (__NR_Linux + 471)
379 +#define __NR_fchroot (__NR_Linux + 472)
380
381 #endif /* _ASM_UNISTD_N64_H */
linux-headers/asm-mips/unistd_o32.h
+1
@@ -446,5 +446,6 @@
446 #define __NR_file_setattr (__NR_Linux + 469)
447 #define __NR_listns (__NR_Linux + 470)
448 #define __NR_rseq_slice_yield (__NR_Linux + 471)
449 +#define __NR_fchroot (__NR_Linux + 472)
450
451 #endif /* _ASM_UNISTD_O32_H */
linux-headers/asm-powerpc/kvm.h
+18
@@ -437,6 +437,24 @@ struct kvm_ppc_cpu_char {
437 __u64 behaviour_mask; /* valid bits in behaviour */
438 };
439
440 +/* For KVM_PPC_GET_COMPAT_CAPS */
441 +struct kvm_ppc_compat_caps {
442 + __u64 size; /* Size of this structure */
443 + __u64 flags; /* Reserved for future use */
444 + __u64 compat_capabilities; /* Capabilities supported by the host */
445 +};
446 +#define KVM_PPC_COMPAT_CAPS_SIZE_VER0 24 /* sizeof first published struct */
447 +
448 +/*
449 + * Capability bits for compat_capabilities field in kvm_ppc_compat_caps.
450 + * These bits indicate which processor compatibility modes are supported.
451 + */
452 +#define KVM_PPC_COMPAT_CAP_POWER9 (1ULL << 62)
453 +#define KVM_PPC_COMPAT_CAP_POWER10 (1ULL << 61)
454 +#define KVM_PPC_COMPAT_CAP_POWER11 (1ULL << 60)
455 +#define KVM_PPC_COMPAT_BITMASK (KVM_PPC_COMPAT_CAP_POWER9 | \
456 + KVM_PPC_COMPAT_CAP_POWER10 | \
457 + KVM_PPC_COMPAT_CAP_POWER11)
458 /*
459 * Values for character and character_mask.
460 * These are identical to the values used by H_GET_CPU_CHARACTERISTICS.
linux-headers/asm-powerpc/unistd_32.h
+1
@@ -453,6 +453,7 @@
453 #define __NR_file_setattr 469
454 #define __NR_listns 470
455 #define __NR_rseq_slice_yield 471
456 +#define __NR_fchroot 472
457
458
459 #endif /* _ASM_UNISTD_32_H */
linux-headers/asm-powerpc/unistd_64.h
+1
@@ -425,6 +425,7 @@
425 #define __NR_file_setattr 469
426 #define __NR_listns 470
427 #define __NR_rseq_slice_yield 471
428 +#define __NR_fchroot 472
429
430
431 #endif /* _ASM_UNISTD_64_H */
linux-headers/asm-riscv/unistd_32.h
+1
@@ -319,6 +319,7 @@
319 #define __NR_file_setattr 469
320 #define __NR_listns 470
321 #define __NR_rseq_slice_yield 471
322 +#define __NR_fchroot 472
323
324
325 #endif /* _ASM_UNISTD_32_H */
linux-headers/asm-riscv/unistd_64.h
+1
@@ -329,6 +329,7 @@
329 #define __NR_file_setattr 469
330 #define __NR_listns 470
331 #define __NR_rseq_slice_yield 471
332 +#define __NR_fchroot 472
333
334
335 #endif /* _ASM_UNISTD_64_H */
linux-headers/asm-s390/unistd_64.h
+1
@@ -391,6 +391,7 @@
391 #define __NR_file_setattr 469
392 #define __NR_listns 470
393 #define __NR_rseq_slice_yield 471
394 +#define __NR_fchroot 472
395
396
397 #endif /* _ASM_UNISTD_64_H */
linux-headers/asm-x86/unistd_32.h
+1
@@ -462,6 +462,7 @@
462 #define __NR_file_setattr 469
463 #define __NR_listns 470
464 #define __NR_rseq_slice_yield 471
465 +#define __NR_fchroot 472
466
467
468 #endif /* _ASM_UNISTD_32_H */
linux-headers/asm-x86/unistd_64.h
+1
@@ -386,6 +386,7 @@
386 #define __NR_file_setattr 469
387 #define __NR_listns 470
388 #define __NR_rseq_slice_yield 471
389 +#define __NR_fchroot 472
390
391
392 #endif /* _ASM_UNISTD_64_H */
linux-headers/asm-x86/unistd_x32.h
+1
@@ -339,6 +339,7 @@
339 #define __NR_file_setattr (__X32_SYSCALL_BIT + 469)
340 #define __NR_listns (__X32_SYSCALL_BIT + 470)
341 #define __NR_rseq_slice_yield (__X32_SYSCALL_BIT + 471)
342 +#define __NR_fchroot (__X32_SYSCALL_BIT + 472)
343 #define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)
344 #define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)
345 #define __NR_ioctl (__X32_SYSCALL_BIT + 514)
linux-headers/linux/const.h
+2 -2
@@ -13,7 +13,7 @@
13 * leave it unchanged in asm.
14 */
15
16 -#ifdef __ASSEMBLY__
16 +#ifdef __ASSEMBLER__
17 #define _AC(X,Y) X
18 #define _AT(T,X) X
19 #else
@@ -28,7 +28,7 @@
28 #define _BITUL(x) (_UL(1) << (x))
29 #define _BITULL(x) (_ULL(1) << (x))
30
31 -#if !defined(__ASSEMBLY__)
31 +#if !defined(__ASSEMBLER__)
32 /*
33 * Missing __asm__ support
34 *
linux-headers/linux/kvm.h
+3
@@ -986,6 +986,7 @@ struct kvm_enable_cap {
986 #define KVM_CAP_S390_KEYOP 247
987 #define KVM_CAP_S390_VSIE_ESAMODE 248
988 #define KVM_CAP_S390_HPAGE_2G 249
989 +#define KVM_CAP_PPC_COMPAT_CAPS 250
990
991 struct kvm_irq_routing_irqchip {
992 __u32 irqchip;
@@ -1330,6 +1331,8 @@ struct kvm_s390_keyop {
1331 /* Available with KVM_CAP_COUNTER_OFFSET */
1332 #define KVM_ARM_SET_COUNTER_OFFSET _IOW(KVMIO, 0xb5, struct kvm_arm_counter_offset)
1333 #define KVM_ARM_GET_REG_WRITABLE_MASKS _IOR(KVMIO, 0xb6, struct reg_mask_range)
1334 +/* Available with KVM_CAP_PPC_COMPAT_CAPS */
1335 +#define KVM_PPC_GET_COMPAT_CAPS _IO(KVMIO, 0xb8)
1336
1337 /* ioctl for vm fd */
1338 #define KVM_CREATE_DEVICE _IOWR(KVMIO, 0xe0, struct kvm_create_device)