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

tools headers UAPI: Sync linux/kvm.h with the kernel sources

To pick the changes in:

86bdf3ebcfe1ded0 ("KVM: Support dirty ring in conjunction with bitmap")

That just rebuilds perf, as these patches don't add any new KVM ioctl to
be harvested for the the 'perf trace' ioctl syscall argument
beautifiers.

This is also by now used by tools/testing/selftests/kvm/, a simple test
build didn't succeed, but for another reason:

lib/kvm_util.c: In function ‘vm_enable_dirty_ring’:
lib/kvm_util.c:125:30: error: ‘KVM_CAP_DIRTY_LOG_RING_ACQ_REL’ undeclared (first use in this function); did you mean ‘KVM_CAP_DIRTY_LOG_RING’?
125 | if (vm_check_cap(vm, KVM_CAP_DIRTY_LOG_RING_ACQ_REL))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| KVM_CAP_DIRTY_LOG_RING

I'll send a separate patch for that.

This silences this perf build warning:

Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Gavin Shan <gshan@redhat.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Link: http://lore.kernel.org/lkml/Y6H3b1Q4Msjy5Yz3@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+12 -1
+12 -1
tools/include/uapi/linux/kvm.h
··· 98 98 /* 99 99 * The bit 0 ~ bit 15 of kvm_userspace_memory_region::flags are visible for 100 100 * userspace, other bits are reserved for kvm internal use which are defined 101 - *in include/linux/kvm_host.h. 101 + * in include/linux/kvm_host.h. 102 102 */ 103 103 #define KVM_MEM_LOG_DIRTY_PAGES (1UL << 0) 104 104 #define KVM_MEM_READONLY (1UL << 1) ··· 477 477 #define KVM_MSR_EXIT_REASON_INVAL (1 << 0) 478 478 #define KVM_MSR_EXIT_REASON_UNKNOWN (1 << 1) 479 479 #define KVM_MSR_EXIT_REASON_FILTER (1 << 2) 480 + #define KVM_MSR_EXIT_REASON_VALID_MASK (KVM_MSR_EXIT_REASON_INVAL | \ 481 + KVM_MSR_EXIT_REASON_UNKNOWN | \ 482 + KVM_MSR_EXIT_REASON_FILTER) 480 483 __u32 reason; /* kernel -> user */ 481 484 __u32 index; /* kernel -> user */ 482 485 __u64 data; /* kernel <-> user */ ··· 1173 1170 #define KVM_CAP_S390_ZPCI_OP 221 1174 1171 #define KVM_CAP_S390_CPU_TOPOLOGY 222 1175 1172 #define KVM_CAP_DIRTY_LOG_RING_ACQ_REL 223 1173 + #define KVM_CAP_S390_PROTECTED_ASYNC_DISABLE 224 1174 + #define KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP 225 1176 1175 1177 1176 #ifdef KVM_CAP_IRQ_ROUTING 1178 1177 ··· 1264 1259 #define KVM_XEN_HVM_CONFIG_RUNSTATE (1 << 3) 1265 1260 #define KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL (1 << 4) 1266 1261 #define KVM_XEN_HVM_CONFIG_EVTCHN_SEND (1 << 5) 1262 + #define KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG (1 << 6) 1267 1263 1268 1264 struct kvm_xen_hvm_config { 1269 1265 __u32 flags; ··· 1732 1726 KVM_PV_UNSHARE_ALL, 1733 1727 KVM_PV_INFO, 1734 1728 KVM_PV_DUMP, 1729 + KVM_PV_ASYNC_CLEANUP_PREPARE, 1730 + KVM_PV_ASYNC_CLEANUP_PERFORM, 1735 1731 }; 1736 1732 1737 1733 struct kvm_pv_cmd { ··· 1764 1756 union { 1765 1757 __u8 long_mode; 1766 1758 __u8 vector; 1759 + __u8 runstate_update_flag; 1767 1760 struct { 1768 1761 __u64 gfn; 1769 1762 } shared_info; ··· 1805 1796 /* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_EVTCHN_SEND */ 1806 1797 #define KVM_XEN_ATTR_TYPE_EVTCHN 0x3 1807 1798 #define KVM_XEN_ATTR_TYPE_XEN_VERSION 0x4 1799 + /* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG */ 1800 + #define KVM_XEN_ATTR_TYPE_RUNSTATE_UPDATE_FLAG 0x5 1808 1801 1809 1802 /* Per-vCPU Xen attributes */ 1810 1803 #define KVM_XEN_VCPU_GET_ATTR _IOWR(KVMIO, 0xca, struct kvm_xen_vcpu_attr)