History

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

To pick the changes in: d9a47edabc4f9481 ("KVM: PPC: Book3S HV: Introduce new capability for 2nd DAWR") 8d4e7e80838f45d3 ("KVM: x86: declare Xen HVM shared info capability and add test case") 40da8ccd724f7ca2 ("KVM: x86/xen: Add event channel interrupt vector upcall") These new IOCTLs are now supported on 'perf trace': $ tools/perf/trace/beauty/kvm_ioctl.sh > before $ cp include/uapi/linux/kvm.h tools/include/uapi/linux/kvm.h $ tools/perf/trace/beauty/kvm_ioctl.sh > after $ diff -u before after --- before 2021-02-23 09:55:46.229058308 -0300 +++ after 2021-02-23 09:55:57.509308058 -0300 @@ -91,6 +91,10 @@ [0xc1] = "GET_SUPPORTED_HV_CPUID", [0xc6] = "X86_SET_MSR_FILTER", [0xc7] = "RESET_DIRTY_RINGS", + [0xc8] = "XEN_HVM_GET_ATTR", + [0xc9] = "XEN_HVM_SET_ATTR", + [0xca] = "XEN_VCPU_GET_ATTR", + [0xcb] = "XEN_VCPU_SET_ATTR", [0xe0] = "CREATE_DEVICE", [0xe1] = "SET_DEVICE_ATTR", [0xe2] = "GET_DEVICE_ATTR", $ Addressing 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

Arnaldo Carvalho de Melo committed 5 years ago

Commit 21b7e351 parent 303550a1 file · +73 −0Browse files

Showing the changes to tools/include/uapi (1 of 1 file). Show all

Unified · Split

tools/include/uapi/linux/kvm.h+73−0
@@ -216,6 +216,20 @@ struct kvm_hyperv_exit { · 215 unmodified lines
216 } u;216 } u;
217};217};
218 218
219struct kvm_xen_exit {
220#define KVM_EXIT_XEN_HCALL 1
221 __u32 type;
222 union {
223 struct {
224 __u32 longmode;
225 __u32 cpl;
226 __u64 input;
227 __u64 result;
228 __u64 params[6];
229 } hcall;
230 } u;
231};
232
219#define KVM_S390_GET_SKEYS_NONE 1233#define KVM_S390_GET_SKEYS_NONE 1
220#define KVM_S390_SKEYS_MAX 1048576234#define KVM_S390_SKEYS_MAX 1048576
221 235
@@ -252,6 +266,8 @@ struct kvm_hyperv_exit { · 30 unmodified lines
252#define KVM_EXIT_X86_WRMSR 30266#define KVM_EXIT_X86_WRMSR 30
253#define KVM_EXIT_DIRTY_RING_FULL 31267#define KVM_EXIT_DIRTY_RING_FULL 31
254#define KVM_EXIT_AP_RESET_HOLD 32268#define KVM_EXIT_AP_RESET_HOLD 32
269#define KVM_EXIT_X86_BUS_LOCK 33
270#define KVM_EXIT_XEN 34
255 271
256/* For KVM_EXIT_INTERNAL_ERROR */272/* For KVM_EXIT_INTERNAL_ERROR */
257/* Emulate instruction failed. */273/* Emulate instruction failed. */
@@ -428,6 +444,8 @@ struct kvm_run { · 170 unmodified lines
428 __u32 index; /* kernel -> user */444 __u32 index; /* kernel -> user */
429 __u64 data; /* kernel <-> user */445 __u64 data; /* kernel <-> user */
430 } msr;446 } msr;
447 /* KVM_EXIT_XEN */
448 struct kvm_xen_exit xen;
431 /* Fix the size of the union. */449 /* Fix the size of the union. */
432 char padding[256];450 char padding[256];
433 };451 };
@@ -1058,6 +1076,7 @@ struct kvm_ppc_resize_hpt { · 624 unmodified lines
1058#define KVM_CAP_ENFORCE_PV_FEATURE_CPUID 1901076#define KVM_CAP_ENFORCE_PV_FEATURE_CPUID 190
1059#define KVM_CAP_SYS_HYPERV_CPUID 1911077#define KVM_CAP_SYS_HYPERV_CPUID 191
1060#define KVM_CAP_DIRTY_LOG_RING 1921078#define KVM_CAP_DIRTY_LOG_RING 192
1079#define KVM_CAP_X86_BUS_LOCK_EXIT 193
1061#define KVM_CAP_PPC_DAWR1 1941080#define KVM_CAP_PPC_DAWR1 194
1062 1081
1063#ifdef KVM_CAP_IRQ_ROUTING1082#ifdef KVM_CAP_IRQ_ROUTING
@@ -1132,6 +1151,10 @@ struct kvm_x86_mce { · 68 unmodified lines
1132#endif1151#endif
1133 1152
1134#ifdef KVM_CAP_XEN_HVM1153#ifdef KVM_CAP_XEN_HVM
1154#define KVM_XEN_HVM_CONFIG_HYPERCALL_MSR (1 << 0)
1155#define KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL (1 << 1)
1156#define KVM_XEN_HVM_CONFIG_SHARED_INFO (1 << 2)
1157
1135struct kvm_xen_hvm_config {1158struct kvm_xen_hvm_config {
1136 __u32 flags;1159 __u32 flags;
1137 __u32 msr;1160 __u32 msr;
@@ -1566,6 +1589,45 @@ struct kvm_pv_cmd { · 428 unmodified lines
1566/* Available with KVM_CAP_DIRTY_LOG_RING */1589/* Available with KVM_CAP_DIRTY_LOG_RING */
1567#define KVM_RESET_DIRTY_RINGS _IO(KVMIO, 0xc7)1590#define KVM_RESET_DIRTY_RINGS _IO(KVMIO, 0xc7)
1568 1591
1592/* Per-VM Xen attributes */
1593#define KVM_XEN_HVM_GET_ATTR _IOWR(KVMIO, 0xc8, struct kvm_xen_hvm_attr)
1594#define KVM_XEN_HVM_SET_ATTR _IOW(KVMIO, 0xc9, struct kvm_xen_hvm_attr)
1595
1596struct kvm_xen_hvm_attr {
1597 __u16 type;
1598 __u16 pad[3];
1599 union {
1600 __u8 long_mode;
1601 __u8 vector;
1602 struct {
1603 __u64 gfn;
1604 } shared_info;
1605 __u64 pad[8];
1606 } u;
1607};
1608
1609/* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFO */
1610#define KVM_XEN_ATTR_TYPE_LONG_MODE 0x0
1611#define KVM_XEN_ATTR_TYPE_SHARED_INFO 0x1
1612#define KVM_XEN_ATTR_TYPE_UPCALL_VECTOR 0x2
1613
1614/* Per-vCPU Xen attributes */
1615#define KVM_XEN_VCPU_GET_ATTR _IOWR(KVMIO, 0xca, struct kvm_xen_vcpu_attr)
1616#define KVM_XEN_VCPU_SET_ATTR _IOW(KVMIO, 0xcb, struct kvm_xen_vcpu_attr)
1617
1618struct kvm_xen_vcpu_attr {
1619 __u16 type;
1620 __u16 pad[3];
1621 union {
1622 __u64 gpa;
1623 __u64 pad[8];
1624 } u;
1625};
1626
1627/* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFO */
1628#define KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO 0x0
1629#define KVM_XEN_VCPU_ATTR_TYPE_VCPU_TIME_INFO 0x1
1630
1569/* Secure Encrypted Virtualization command */1631/* Secure Encrypted Virtualization command */
1570enum sev_cmd_id {1632enum sev_cmd_id {
1571 /* Guest initialization commands */1633 /* Guest initialization commands */
@@ -1594,6 +1656,8 @@ enum sev_cmd_id { · 22 unmodified lines
1594 KVM_SEV_DBG_ENCRYPT,1656 KVM_SEV_DBG_ENCRYPT,
1595 /* Guest certificates commands */1657 /* Guest certificates commands */
1596 KVM_SEV_CERT_EXPORT,1658 KVM_SEV_CERT_EXPORT,
1659 /* Attestation report */
1660 KVM_SEV_GET_ATTESTATION_REPORT,
1597 1661
1598 KVM_SEV_NR_MAX,1662 KVM_SEV_NR_MAX,
1599};1663};
@@ -1646,6 +1710,12 @@ struct kvm_sev_dbg { · 46 unmodified lines
1646 __u32 len;1710 __u32 len;
1647};1711};
1648 1712
1713struct kvm_sev_attestation_report {
1714 __u8 mnonce[16];
1715 __u64 uaddr;
1716 __u32 len;
1717};
1718
1649#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)1719#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)
1650#define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1)1720#define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1)
1651#define KVM_DEV_ASSIGN_MASK_INTX (1 << 2)1721#define KVM_DEV_ASSIGN_MASK_INTX (1 << 2)
@@ -1767,4 +1837,7 @@ struct kvm_dirty_gfn { · 115 unmodified lines
1767 __u64 offset;1837 __u64 offset;
1768};1838};
1769 1839
1840#define KVM_BUS_LOCK_DETECTION_OFF (1 << 0)
1841#define KVM_BUS_LOCK_DETECTION_EXIT (1 << 1)
1842
1770#endif /* __LINUX_KVM_H */1843#endif /* __LINUX_KVM_H */

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