Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'kvm-x86-fixes-7.1' of https://github.com/kvm-x86/linux into HEAD

KVM x86 fixes for 7.1

Declare flexible arrays in uAPI structures using __DECLARE_FLEX_ARRAY() so
that KVM's uAPI headers can be included in C++ projects.

+12 -11
+6 -6
arch/x86/include/uapi/asm/kvm.h
··· 197 197 __u32 nmsrs; /* number of msrs in entries */ 198 198 __u32 pad; 199 199 200 - struct kvm_msr_entry entries[]; 200 + __DECLARE_FLEX_ARRAY(struct kvm_msr_entry, entries); 201 201 }; 202 202 203 203 /* for KVM_GET_MSR_INDEX_LIST */ 204 204 struct kvm_msr_list { 205 205 __u32 nmsrs; /* number of msrs in entries */ 206 - __u32 indices[]; 206 + __DECLARE_FLEX_ARRAY(__u32, indices); 207 207 }; 208 208 209 209 /* Maximum size of any access bitmap in bytes */ ··· 245 245 struct kvm_cpuid { 246 246 __u32 nent; 247 247 __u32 padding; 248 - struct kvm_cpuid_entry entries[]; 248 + __DECLARE_FLEX_ARRAY(struct kvm_cpuid_entry, entries); 249 249 }; 250 250 251 251 struct kvm_cpuid_entry2 { ··· 267 267 struct kvm_cpuid2 { 268 268 __u32 nent; 269 269 __u32 padding; 270 - struct kvm_cpuid_entry2 entries[]; 270 + __DECLARE_FLEX_ARRAY(struct kvm_cpuid_entry2, entries); 271 271 }; 272 272 273 273 /* for KVM_GET_PIT and KVM_SET_PIT */ ··· 398 398 * the contents of CPUID leaf 0xD on the host. 399 399 */ 400 400 __u32 region[1024]; 401 - __u32 extra[]; 401 + __DECLARE_FLEX_ARRAY(__u32, extra); 402 402 }; 403 403 404 404 #define KVM_MAX_XCRS 16 ··· 566 566 __u32 fixed_counter_bitmap; 567 567 __u32 flags; 568 568 __u32 pad[4]; 569 - __u64 events[]; 569 + __DECLARE_FLEX_ARRAY(__u64, events); 570 570 }; 571 571 572 572 #define KVM_PMU_EVENT_ALLOW 0
+6 -5
include/uapi/linux/kvm.h
··· 11 11 #include <linux/const.h> 12 12 #include <linux/types.h> 13 13 #include <linux/compiler.h> 14 + #include <linux/stddef.h> 14 15 #include <linux/ioctl.h> 15 16 #include <asm/kvm.h> 16 17 ··· 543 542 544 543 struct kvm_coalesced_mmio_ring { 545 544 __u32 first, last; 546 - struct kvm_coalesced_mmio coalesced_mmio[]; 545 + __DECLARE_FLEX_ARRAY(struct kvm_coalesced_mmio, coalesced_mmio); 547 546 }; 548 547 549 548 #define KVM_COALESCED_MMIO_MAX \ ··· 593 592 /* for KVM_SET_SIGNAL_MASK */ 594 593 struct kvm_signal_mask { 595 594 __u32 len; 596 - __u8 sigset[]; 595 + __DECLARE_FLEX_ARRAY(__u8, sigset); 597 596 }; 598 597 599 598 /* for KVM_TPR_ACCESS_REPORTING */ ··· 1052 1051 struct kvm_irq_routing { 1053 1052 __u32 nr; 1054 1053 __u32 flags; 1055 - struct kvm_irq_routing_entry entries[]; 1054 + __DECLARE_FLEX_ARRAY(struct kvm_irq_routing_entry, entries); 1056 1055 }; 1057 1056 1058 1057 #define KVM_IRQFD_FLAG_DEASSIGN (1 << 0) ··· 1143 1142 1144 1143 struct kvm_reg_list { 1145 1144 __u64 n; /* number of regs */ 1146 - __u64 reg[]; 1145 + __DECLARE_FLEX_ARRAY(__u64, reg); 1147 1146 }; 1148 1147 1149 1148 struct kvm_one_reg { ··· 1609 1608 #ifdef __KERNEL__ 1610 1609 char name[KVM_STATS_NAME_SIZE]; 1611 1610 #else 1612 - char name[]; 1611 + __DECLARE_FLEX_ARRAY(char, name); 1613 1612 #endif 1614 1613 }; 1615 1614