History

tools/include: Sync kernel ABI headers with tooling headers

Sync (copy) the following v4.12 kernel headers to the tooling headers: arch/x86/include/asm/disabled-features.h: arch/x86/include/uapi/asm/kvm.h: arch/powerpc/include/uapi/asm/kvm.h: arch/s390/include/uapi/asm/kvm.h: arch/arm/include/uapi/asm/kvm.h: arch/arm64/include/uapi/asm/kvm.h: - 'struct kvm_sync_regs' got changed in an ABI-incompatible way, fortunately none of the (in-kernel) tooling relied on it - new KVM_DEV calls added arch/x86/include/asm/required-features.h: - 5-level paging hardware ABI detail added arch/x86/include/asm/cpufeatures.h: - new CPU feature added arch/x86/include/uapi/asm/vmx.h: - new VMX exit conditions None of the changes requires fixes in the tooling source code. This addresses the following warnings: Warning: include/uapi/linux/stat.h differs from kernel Warning: arch/x86/include/asm/disabled-features.h differs from kernel Warning: arch/x86/include/asm/required-features.h differs from kernel Warning: arch/x86/include/asm/cpufeatures.h differs from kernel Warning: arch/x86/include/uapi/asm/kvm.h differs from kernel Warning: arch/x86/include/uapi/asm/vmx.h differs from kernel Warning: arch/powerpc/include/uapi/asm/kvm.h differs from kernel Warning: arch/s390/include/uapi/asm/kvm.h differs from kernel Warning: arch/arm/include/uapi/asm/kvm.h differs from kernel Warning: arch/arm64/include/uapi/asm/kvm.h differs from kernel

Ingo Molnar committed 9 years ago

Commit 6e304371 parent 7111fff10 files · +84 −19Browse files

Unified · Split

10 files
  1. tools/arch/arm/include/uapi/asm/kvm.h +9 −1
  2. tools/arch/arm64/include/uapi/asm/kvm.h +9 −1
  3. tools/arch/powerpc/include/uapi/asm/kvm.h +3 −0
  4. tools/arch/s390/include/uapi/asm/kvm.h +24 −2
  5. tools/arch/x86/include/asm/cpufeatures.h +2 −0
  6. tools/arch/x86/include/asm/disabled-features.h +7 −1
  7. tools/arch/x86/include/asm/required-features.h +7 −1
  8. tools/arch/x86/include/uapi/asm/kvm.h +3 −0
  9. tools/arch/x86/include/uapi/asm/vmx.h +18 −7
  10. tools/include/uapi/linux/stat.h +2 −6
tools/arch/arm/include/uapi/asm/kvm.h+9−1
@@ -27,6 +27,8 @@ · 26 unmodified lines
2727 #define __KVM_HAVE_IRQ_LINE
2828 #define __KVM_HAVE_READONLY_MEM
2929
30+#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
31+
3032 #define KVM_REG_SIZE(id) \
3133 (1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT))
3234
@@ -114,6 +116,8 @@ struct kvm_debug_exit_arch { · 81 unmodified lines
114116 };
115117
116118 struct kvm_sync_regs {
119+ /* Used with KVM_CAP_ARM_USER_IRQ */
120+ __u64 device_irq_level;
117121 };
118122
119123 struct kvm_arch_memory_slot {
@@ -192,13 +196,17 @@ struct kvm_arch_memory_slot { · 72 unmodified lines
192196 #define KVM_DEV_ARM_VGIC_GRP_REDIST_REGS 5
193197 #define KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS 6
194198 #define KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO 7
199+#define KVM_DEV_ARM_VGIC_GRP_ITS_REGS 8
195200 #define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT 10
196201 #define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_MASK \
197202 (0x3fffffULL << KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT)
198203 #define KVM_DEV_ARM_VGIC_LINE_LEVEL_INTID_MASK 0x3ff
199204 #define VGIC_LEVEL_INFO_LINE_LEVEL 0
200205
201−#define KVM_DEV_ARM_VGIC_CTRL_INIT 0
206+#define KVM_DEV_ARM_VGIC_CTRL_INIT 0
207+#define KVM_DEV_ARM_ITS_SAVE_TABLES 1
208+#define KVM_DEV_ARM_ITS_RESTORE_TABLES 2
209+#define KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES 3
202210
203211 /* KVM_IRQ_LINE irq field index values */
204212 #define KVM_ARM_IRQ_TYPE_SHIFT 24
tools/arch/arm64/include/uapi/asm/kvm.h+9−1
@@ -39,6 +39,8 @@ · 38 unmodified lines
3939 #define __KVM_HAVE_IRQ_LINE
4040 #define __KVM_HAVE_READONLY_MEM
4141
42+#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
43+
4244 #define KVM_REG_SIZE(id) \
4345 (1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT))
4446
@@ -143,6 +145,8 @@ struct kvm_debug_exit_arch { · 98 unmodified lines
143145 #define KVM_GUESTDBG_USE_HW (1 << 17)
144146
145147 struct kvm_sync_regs {
148+ /* Used with KVM_CAP_ARM_USER_IRQ */
149+ __u64 device_irq_level;
146150 };
147151
148152 struct kvm_arch_memory_slot {
@@ -212,13 +216,17 @@ struct kvm_arch_memory_slot { · 63 unmodified lines
212216 #define KVM_DEV_ARM_VGIC_GRP_REDIST_REGS 5
213217 #define KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS 6
214218 #define KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO 7
219+#define KVM_DEV_ARM_VGIC_GRP_ITS_REGS 8
215220 #define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT 10
216221 #define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_MASK \
217222 (0x3fffffULL << KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT)
218223 #define KVM_DEV_ARM_VGIC_LINE_LEVEL_INTID_MASK 0x3ff
219224 #define VGIC_LEVEL_INFO_LINE_LEVEL 0
220225
221−#define KVM_DEV_ARM_VGIC_CTRL_INIT 0
226+#define KVM_DEV_ARM_VGIC_CTRL_INIT 0
227+#define KVM_DEV_ARM_ITS_SAVE_TABLES 1
228+#define KVM_DEV_ARM_ITS_RESTORE_TABLES 2
229+#define KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES 3
222230
223231 /* Device Control API on vcpu fd */
224232 #define KVM_ARM_VCPU_PMU_V3_CTRL 0
tools/arch/powerpc/include/uapi/asm/kvm.h+3−0
@@ -29,6 +29,9 @@ · 28 unmodified lines
2929 #define __KVM_HAVE_IRQ_LINE
3030 #define __KVM_HAVE_GUEST_DEBUG
3131
32+/* Not always available, but if it is, this is the correct offset. */
33+#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
34+
3235 struct kvm_regs {
3336 __u64 pc;
3437 __u64 cr;
tools/arch/s390/include/uapi/asm/kvm.h+24−2
@@ -26,6 +26,8 @@ · 25 unmodified lines
2626 #define KVM_DEV_FLIC_ADAPTER_REGISTER 6
2727 #define KVM_DEV_FLIC_ADAPTER_MODIFY 7
2828 #define KVM_DEV_FLIC_CLEAR_IO_IRQ 8
29+#define KVM_DEV_FLIC_AISM 9
30+#define KVM_DEV_FLIC_AIRQ_INJECT 10
2931 /*
3032 * We can have up to 4*64k pending subchannels + 8 adapter interrupts,
3133 * as well as up to ASYNC_PF_PER_VCPU*KVM_MAX_VCPUS pfault done interrupts.
@@ -41,7 +43,14 @@ struct kvm_s390_io_adapter { · 9 unmodified lines
4143 __u8 isc;
4244 __u8 maskable;
4345 __u8 swap;
44− __u8 pad;
46+ __u8 flags;
47+};
48+
49+#define KVM_S390_ADAPTER_SUPPRESSIBLE 0x01
50+
51+struct kvm_s390_ais_req {
52+ __u8 isc;
53+ __u16 mode;
4554 };
4655
4756 #define KVM_S390_IO_ADAPTER_MASK 1
@@ -110,6 +119,7 @@ struct kvm_s390_vm_cpu_machine { · 62 unmodified lines
110119 #define KVM_S390_VM_CPU_FEAT_CMMA 10
111120 #define KVM_S390_VM_CPU_FEAT_PFMFI 11
112121 #define KVM_S390_VM_CPU_FEAT_SIGPIF 12
122+#define KVM_S390_VM_CPU_FEAT_KSS 13
113123 struct kvm_s390_vm_cpu_feat {
114124 __u64 feat[16];
115125 };
@@ -198,6 +208,10 @@ struct kvm_guest_debug_arch { · 82 unmodified lines
198208 #define KVM_SYNC_VRS (1UL << 6)
199209 #define KVM_SYNC_RICCB (1UL << 7)
200210 #define KVM_SYNC_FPRS (1UL << 8)
211+#define KVM_SYNC_GSCB (1UL << 9)
212+/* length and alignment of the sdnx as a power of two */
213+#define SDNXC 8
214+#define SDNXL (1UL << SDNXC)
201215 /* definition of registers in kvm_run */
202216 struct kvm_sync_regs {
203217 __u64 prefix; /* prefix register */
@@ -218,8 +232,16 @@ struct kvm_sync_regs { · 14 unmodified lines
218232 };
219233 __u8 reserved[512]; /* for future vector expansion */
220234 __u32 fpc; /* valid on KVM_SYNC_VRS or KVM_SYNC_FPRS */
221− __u8 padding[52]; /* riccb needs to be 64byte aligned */
235+ __u8 padding1[52]; /* riccb needs to be 64byte aligned */
222236 __u8 riccb[64]; /* runtime instrumentation controls block */
237+ __u8 padding2[192]; /* sdnx needs to be 256byte aligned */
238+ union {
239+ __u8 sdnx[SDNXL]; /* state description annex */
240+ struct {
241+ __u64 reserved1[2];
242+ __u64 gscb[4];
243+ };
244+ };
223245 };
224246
225247 #define KVM_REG_S390_TODPR (KVM_REG_S390 | KVM_REG_SIZE_U32 | 0x1)
tools/arch/x86/include/asm/cpufeatures.h+2−0
@@ -202,6 +202,8 @@ · 201 unmodified lines
202202 #define X86_FEATURE_AVX512_4VNNIW (7*32+16) /* AVX-512 Neural Network Instructions */
203203 #define X86_FEATURE_AVX512_4FMAPS (7*32+17) /* AVX-512 Multiply Accumulation Single precision */
204204
205+#define X86_FEATURE_MBA ( 7*32+18) /* Memory Bandwidth Allocation */
206+
205207 /* Virtualization flags: Linux defined, word 8 */
206208 #define X86_FEATURE_TPR_SHADOW ( 8*32+ 0) /* Intel TPR Shadow */
207209 #define X86_FEATURE_VNMI ( 8*32+ 1) /* Intel Virtual NMI */
tools/arch/x86/include/asm/disabled-features.h+7−1
@@ -36,6 +36,12 @@ · 35 unmodified lines
3636 # define DISABLE_OSPKE (1<<(X86_FEATURE_OSPKE & 31))
3737 #endif /* CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS */
3838
39+#ifdef CONFIG_X86_5LEVEL
40+# define DISABLE_LA57 0
41+#else
42+# define DISABLE_LA57 (1<<(X86_FEATURE_LA57 & 31))
43+#endif
44+
3945 /*
4046 * Make sure to add features to the correct mask
4147 */
@@ -55,7 +61,7 @@ · 13 unmodified lines
5561 #define DISABLED_MASK13 0
5662 #define DISABLED_MASK14 0
5763 #define DISABLED_MASK15 0
58−#define DISABLED_MASK16 (DISABLE_PKU|DISABLE_OSPKE)
64+#define DISABLED_MASK16 (DISABLE_PKU|DISABLE_OSPKE|DISABLE_LA57)
5965 #define DISABLED_MASK17 0
6066 #define DISABLED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 18)
6167
tools/arch/x86/include/asm/required-features.h+7−1
@@ -53,6 +53,12 @@ · 52 unmodified lines
5353 # define NEED_MOVBE 0
5454 #endif
5555
56+#ifdef CONFIG_X86_5LEVEL
57+# define NEED_LA57 (1<<(X86_FEATURE_LA57 & 31))
58+#else
59+# define NEED_LA57 0
60+#endif
61+
5662 #ifdef CONFIG_X86_64
5763 #ifdef CONFIG_PARAVIRT
5864 /* Paravirtualized systems may not have PSE or PGE available */
@@ -98,7 +104,7 @@ · 39 unmodified lines
98104 #define REQUIRED_MASK13 0
99105 #define REQUIRED_MASK14 0
100106 #define REQUIRED_MASK15 0
101−#define REQUIRED_MASK16 0
107+#define REQUIRED_MASK16 (NEED_LA57)
102108 #define REQUIRED_MASK17 0
103109 #define REQUIRED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 18)
104110
tools/arch/x86/include/uapi/asm/kvm.h+3−0
@@ -9,6 +9,9 @@ · 8 unmodified lines
99 #include <linux/types.h>
1010 #include <linux/ioctl.h>
1111
12+#define KVM_PIO_PAGE_OFFSET 1
13+#define KVM_COALESCED_MMIO_PAGE_OFFSET 2
14+
1215 #define DE_VECTOR 0
1316 #define DB_VECTOR 1
1417 #define BP_VECTOR 3
tools/arch/x86/include/uapi/asm/vmx.h+18−7
@@ -76,7 +76,11 @@ · 75 unmodified lines
7676 #define EXIT_REASON_WBINVD 54
7777 #define EXIT_REASON_XSETBV 55
7878 #define EXIT_REASON_APIC_WRITE 56
79+#define EXIT_REASON_RDRAND 57
7980 #define EXIT_REASON_INVPCID 58
81+#define EXIT_REASON_VMFUNC 59
82+#define EXIT_REASON_ENCLS 60
83+#define EXIT_REASON_RDSEED 61
8084 #define EXIT_REASON_PML_FULL 62
8185 #define EXIT_REASON_XSAVES 63
8286 #define EXIT_REASON_XRSTORS 64
@@ -90,6 +94,7 @@ · 7 unmodified lines
9094 { EXIT_REASON_TASK_SWITCH, "TASK_SWITCH" }, \
9195 { EXIT_REASON_CPUID, "CPUID" }, \
9296 { EXIT_REASON_HLT, "HLT" }, \
97+ { EXIT_REASON_INVD, "INVD" }, \
9398 { EXIT_REASON_INVLPG, "INVLPG" }, \
9499 { EXIT_REASON_RDPMC, "RDPMC" }, \
95100 { EXIT_REASON_RDTSC, "RDTSC" }, \
@@ -108,6 +113,8 @@ · 12 unmodified lines
108113 { EXIT_REASON_IO_INSTRUCTION, "IO_INSTRUCTION" }, \
109114 { EXIT_REASON_MSR_READ, "MSR_READ" }, \
110115 { EXIT_REASON_MSR_WRITE, "MSR_WRITE" }, \
116+ { EXIT_REASON_INVALID_STATE, "INVALID_STATE" }, \
117+ { EXIT_REASON_MSR_LOAD_FAIL, "MSR_LOAD_FAIL" }, \
111118 { EXIT_REASON_MWAIT_INSTRUCTION, "MWAIT_INSTRUCTION" }, \
112119 { EXIT_REASON_MONITOR_TRAP_FLAG, "MONITOR_TRAP_FLAG" }, \
113120 { EXIT_REASON_MONITOR_INSTRUCTION, "MONITOR_INSTRUCTION" }, \
@@ -115,20 +122,24 @@ · 1 unmodified line
115122 { EXIT_REASON_MCE_DURING_VMENTRY, "MCE_DURING_VMENTRY" }, \
116123 { EXIT_REASON_TPR_BELOW_THRESHOLD, "TPR_BELOW_THRESHOLD" }, \
117124 { EXIT_REASON_APIC_ACCESS, "APIC_ACCESS" }, \
118− { EXIT_REASON_GDTR_IDTR, "GDTR_IDTR" }, \
119− { EXIT_REASON_LDTR_TR, "LDTR_TR" }, \
125+ { EXIT_REASON_EOI_INDUCED, "EOI_INDUCED" }, \
126+ { EXIT_REASON_GDTR_IDTR, "GDTR_IDTR" }, \
127+ { EXIT_REASON_LDTR_TR, "LDTR_TR" }, \
120128 { EXIT_REASON_EPT_VIOLATION, "EPT_VIOLATION" }, \
121129 { EXIT_REASON_EPT_MISCONFIG, "EPT_MISCONFIG" }, \
122130 { EXIT_REASON_INVEPT, "INVEPT" }, \
131+ { EXIT_REASON_RDTSCP, "RDTSCP" }, \
123132 { EXIT_REASON_PREEMPTION_TIMER, "PREEMPTION_TIMER" }, \
133+ { EXIT_REASON_INVVPID, "INVVPID" }, \
124134 { EXIT_REASON_WBINVD, "WBINVD" }, \
135+ { EXIT_REASON_XSETBV, "XSETBV" }, \
125136 { EXIT_REASON_APIC_WRITE, "APIC_WRITE" }, \
126− { EXIT_REASON_EOI_INDUCED, "EOI_INDUCED" }, \
127− { EXIT_REASON_INVALID_STATE, "INVALID_STATE" }, \
128− { EXIT_REASON_MSR_LOAD_FAIL, "MSR_LOAD_FAIL" }, \
129− { EXIT_REASON_INVD, "INVD" }, \
130− { EXIT_REASON_INVVPID, "INVVPID" }, \
137+ { EXIT_REASON_RDRAND, "RDRAND" }, \
131138 { EXIT_REASON_INVPCID, "INVPCID" }, \
139+ { EXIT_REASON_VMFUNC, "VMFUNC" }, \
140+ { EXIT_REASON_ENCLS, "ENCLS" }, \
141+ { EXIT_REASON_RDSEED, "RDSEED" }, \
142+ { EXIT_REASON_PML_FULL, "PML_FULL" }, \
132143 { EXIT_REASON_XSAVES, "XSAVES" }, \
133144 { EXIT_REASON_XRSTORS, "XRSTORS" }
134145
tools/include/uapi/linux/stat.h+2−6
@@ -48,17 +48,13 @@ · 47 unmodified lines
4848 * tv_sec holds the number of seconds before (negative) or after (positive)
4949 * 00:00:00 1st January 1970 UTC.
5050 *
51− * tv_nsec holds a number of nanoseconds before (0..-999,999,999 if tv_sec is
52− * negative) or after (0..999,999,999 if tv_sec is positive) the tv_sec time.
53− *
54− * Note that if both tv_sec and tv_nsec are non-zero, then the two values must
55− * either be both positive or both negative.
51+ * tv_nsec holds a number of nanoseconds (0..999,999,999) after the tv_sec time.
5652 *
5753 * __reserved is held in case we need a yet finer resolution.
5854 */
5955 struct statx_timestamp {
6056 __s64 tv_sec;
61− __s32 tv_nsec;
57+ __u32 tv_nsec;
6258 __s32 __reserved;
6359 };
6460

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t