api.rst (1cfc9c4b9d4606a1e90e7dbc50058b9f0c1d43a6) | api.rst (14243b387137a4afbe1df5d9dc15182d6657bb79) |
---|---|
1.. SPDX-License-Identifier: GPL-2.0 2 3=================================================================== 4The Definitive KVM (Kernel-based Virtual Machine) API Documentation 5=================================================================== 6 71. General description 8====================== --- 1785 unchanged lines hidden (view full) --- 1794 __u32 type; 1795 __u32 flags; 1796 __u32 pad; 1797 union { 1798 struct kvm_irq_routing_irqchip irqchip; 1799 struct kvm_irq_routing_msi msi; 1800 struct kvm_irq_routing_s390_adapter adapter; 1801 struct kvm_irq_routing_hv_sint hv_sint; | 1.. SPDX-License-Identifier: GPL-2.0 2 3=================================================================== 4The Definitive KVM (Kernel-based Virtual Machine) API Documentation 5=================================================================== 6 71. General description 8====================== --- 1785 unchanged lines hidden (view full) --- 1794 __u32 type; 1795 __u32 flags; 1796 __u32 pad; 1797 union { 1798 struct kvm_irq_routing_irqchip irqchip; 1799 struct kvm_irq_routing_msi msi; 1800 struct kvm_irq_routing_s390_adapter adapter; 1801 struct kvm_irq_routing_hv_sint hv_sint; |
1802 struct kvm_irq_routing_xen_evtchn xen_evtchn; |
|
1802 __u32 pad[8]; 1803 } u; 1804 }; 1805 1806 /* gsi routing entry types */ 1807 #define KVM_IRQ_ROUTING_IRQCHIP 1 1808 #define KVM_IRQ_ROUTING_MSI 2 1809 #define KVM_IRQ_ROUTING_S390_ADAPTER 3 1810 #define KVM_IRQ_ROUTING_HV_SINT 4 | 1803 __u32 pad[8]; 1804 } u; 1805 }; 1806 1807 /* gsi routing entry types */ 1808 #define KVM_IRQ_ROUTING_IRQCHIP 1 1809 #define KVM_IRQ_ROUTING_MSI 2 1810 #define KVM_IRQ_ROUTING_S390_ADAPTER 3 1811 #define KVM_IRQ_ROUTING_HV_SINT 4 |
1812 #define KVM_IRQ_ROUTING_XEN_EVTCHN 5 |
|
1811 1812flags: 1813 1814- KVM_MSI_VALID_DEVID: used along with KVM_IRQ_ROUTING_MSI routing entry 1815 type, specifies that the devid field contains a valid value. The per-VM 1816 KVM_CAP_MSI_DEVID capability advertises the requirement to provide 1817 the device ID. If this capability is not available, userspace should 1818 never set the KVM_MSI_VALID_DEVID flag as the ioctl might fail. --- 35 unchanged lines hidden (view full) --- 1854 __u32 adapter_id; 1855 }; 1856 1857 struct kvm_irq_routing_hv_sint { 1858 __u32 vcpu; 1859 __u32 sint; 1860 }; 1861 | 1813 1814flags: 1815 1816- KVM_MSI_VALID_DEVID: used along with KVM_IRQ_ROUTING_MSI routing entry 1817 type, specifies that the devid field contains a valid value. The per-VM 1818 KVM_CAP_MSI_DEVID capability advertises the requirement to provide 1819 the device ID. If this capability is not available, userspace should 1820 never set the KVM_MSI_VALID_DEVID flag as the ioctl might fail. --- 35 unchanged lines hidden (view full) --- 1856 __u32 adapter_id; 1857 }; 1858 1859 struct kvm_irq_routing_hv_sint { 1860 __u32 vcpu; 1861 __u32 sint; 1862 }; 1863 |
1864 struct kvm_irq_routing_xen_evtchn { 1865 __u32 port; 1866 __u32 vcpu; 1867 __u32 priority; 1868 }; |
|
1862 | 1869 |
1870 1871When KVM_CAP_XEN_HVM includes the KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL bit 1872in its indication of supported features, routing to Xen event channels 1873is supported. Although the priority field is present, only the value 1874KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL is supported, which means delivery by 18752 level event channels. FIFO event channel support may be added in 1876the future. 1877 1878 |
|
18634.55 KVM_SET_TSC_KHZ 1864-------------------- 1865 1866:Capability: KVM_CAP_TSC_CONTROL 1867:Architectures: x86 1868:Type: vcpu ioctl 1869:Parameters: virtual tsc_khz 1870:Returns: 0 on success, -1 on error --- 5537 unchanged lines hidden (view full) --- 7408 7409This capability indicates the features that Xen supports for hosting Xen 7410PVHVM guests. Valid flags are:: 7411 7412 #define KVM_XEN_HVM_CONFIG_HYPERCALL_MSR (1 << 0) 7413 #define KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL (1 << 1) 7414 #define KVM_XEN_HVM_CONFIG_SHARED_INFO (1 << 2) 7415 #define KVM_XEN_HVM_CONFIG_RUNSTATE (1 << 2) | 18794.55 KVM_SET_TSC_KHZ 1880-------------------- 1881 1882:Capability: KVM_CAP_TSC_CONTROL 1883:Architectures: x86 1884:Type: vcpu ioctl 1885:Parameters: virtual tsc_khz 1886:Returns: 0 on success, -1 on error --- 5537 unchanged lines hidden (view full) --- 7424 7425This capability indicates the features that Xen supports for hosting Xen 7426PVHVM guests. Valid flags are:: 7427 7428 #define KVM_XEN_HVM_CONFIG_HYPERCALL_MSR (1 << 0) 7429 #define KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL (1 << 1) 7430 #define KVM_XEN_HVM_CONFIG_SHARED_INFO (1 << 2) 7431 #define KVM_XEN_HVM_CONFIG_RUNSTATE (1 << 2) |
7432 #define KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL (1 << 3) |
|
7416 7417The KVM_XEN_HVM_CONFIG_HYPERCALL_MSR flag indicates that the KVM_XEN_HVM_CONFIG 7418ioctl is available, for the guest to set its hypercall page. 7419 7420If KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL is also set, the same flag may also be 7421provided in the flags to KVM_XEN_HVM_CONFIG, without providing hypercall page 7422contents, to request that KVM generate hypercall page content automatically 7423and also enable interception of guest hypercalls with KVM_EXIT_XEN. 7424 7425The KVM_XEN_HVM_CONFIG_SHARED_INFO flag indicates the availability of the 7426KVM_XEN_HVM_SET_ATTR, KVM_XEN_HVM_GET_ATTR, KVM_XEN_VCPU_SET_ATTR and 7427KVM_XEN_VCPU_GET_ATTR ioctls, as well as the delivery of exception vectors 7428for event channel upcalls when the evtchn_upcall_pending field of a vcpu's 7429vcpu_info is set. 7430 7431The KVM_XEN_HVM_CONFIG_RUNSTATE flag indicates that the runstate-related 7432features KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADDR/_CURRENT/_DATA/_ADJUST are 7433supported by the KVM_XEN_VCPU_SET_ATTR/KVM_XEN_VCPU_GET_ATTR ioctls. 7434 | 7433 7434The KVM_XEN_HVM_CONFIG_HYPERCALL_MSR flag indicates that the KVM_XEN_HVM_CONFIG 7435ioctl is available, for the guest to set its hypercall page. 7436 7437If KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL is also set, the same flag may also be 7438provided in the flags to KVM_XEN_HVM_CONFIG, without providing hypercall page 7439contents, to request that KVM generate hypercall page content automatically 7440and also enable interception of guest hypercalls with KVM_EXIT_XEN. 7441 7442The KVM_XEN_HVM_CONFIG_SHARED_INFO flag indicates the availability of the 7443KVM_XEN_HVM_SET_ATTR, KVM_XEN_HVM_GET_ATTR, KVM_XEN_VCPU_SET_ATTR and 7444KVM_XEN_VCPU_GET_ATTR ioctls, as well as the delivery of exception vectors 7445for event channel upcalls when the evtchn_upcall_pending field of a vcpu's 7446vcpu_info is set. 7447 7448The KVM_XEN_HVM_CONFIG_RUNSTATE flag indicates that the runstate-related 7449features KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADDR/_CURRENT/_DATA/_ADJUST are 7450supported by the KVM_XEN_VCPU_SET_ATTR/KVM_XEN_VCPU_GET_ATTR ioctls. 7451 |
7452The KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL flag indicates that IRQ routing entries 7453of the type KVM_IRQ_ROUTING_XEN_EVTCHN are supported, with the priority 7454field set to indicate 2 level event channel delivery. 7455 |
|
74358.31 KVM_CAP_PPC_MULTITCE 7436------------------------- 7437 7438:Capability: KVM_CAP_PPC_MULTITCE 7439:Architectures: ppc 7440:Type: vm 7441 7442This capability means the kernel is capable of handling hypercalls --- 56 unchanged lines hidden --- | 74568.31 KVM_CAP_PPC_MULTITCE 7457------------------------- 7458 7459:Capability: KVM_CAP_PPC_MULTITCE 7460:Architectures: ppc 7461:Type: vm 7462 7463This capability means the kernel is capable of handling hypercalls --- 56 unchanged lines hidden --- |