aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/virtual/kvm/api.txt140
1 files changed, 135 insertions, 5 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index f6ec3a92e621..a4df5535996b 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -1194,12 +1194,15 @@ struct kvm_ppc_pvinfo {
1194This ioctl fetches PV specific information that need to be passed to the guest 1194This ioctl fetches PV specific information that need to be passed to the guest
1195using the device tree or other means from vm context. 1195using the device tree or other means from vm context.
1196 1196
1197For now the only implemented piece of information distributed here is an array 1197The hcall array defines 4 instructions that make up a hypercall.
1198of 4 instructions that make up a hypercall.
1199 1198
1200If any additional field gets added to this structure later on, a bit for that 1199If any additional field gets added to this structure later on, a bit for that
1201additional piece of information will be set in the flags bitmap. 1200additional piece of information will be set in the flags bitmap.
1202 1201
1202The flags bitmap is defined as:
1203
1204 /* the host supports the ePAPR idle hcall
1205 #define KVM_PPC_PVINFO_FLAGS_EV_IDLE (1<<0)
1203 1206
12044.48 KVM_ASSIGN_PCI_DEVICE 12074.48 KVM_ASSIGN_PCI_DEVICE
1205 1208
@@ -1731,7 +1734,46 @@ registers, find a list below:
1731 Arch | Register | Width (bits) 1734 Arch | Register | Width (bits)
1732 | | 1735 | |
1733 PPC | KVM_REG_PPC_HIOR | 64 1736 PPC | KVM_REG_PPC_HIOR | 64
1734 1737 PPC | KVM_REG_PPC_IAC1 | 64
1738 PPC | KVM_REG_PPC_IAC2 | 64
1739 PPC | KVM_REG_PPC_IAC3 | 64
1740 PPC | KVM_REG_PPC_IAC4 | 64
1741 PPC | KVM_REG_PPC_DAC1 | 64
1742 PPC | KVM_REG_PPC_DAC2 | 64
1743 PPC | KVM_REG_PPC_DABR | 64
1744 PPC | KVM_REG_PPC_DSCR | 64
1745 PPC | KVM_REG_PPC_PURR | 64
1746 PPC | KVM_REG_PPC_SPURR | 64
1747 PPC | KVM_REG_PPC_DAR | 64
1748 PPC | KVM_REG_PPC_DSISR | 32
1749 PPC | KVM_REG_PPC_AMR | 64
1750 PPC | KVM_REG_PPC_UAMOR | 64
1751 PPC | KVM_REG_PPC_MMCR0 | 64
1752 PPC | KVM_REG_PPC_MMCR1 | 64
1753 PPC | KVM_REG_PPC_MMCRA | 64
1754 PPC | KVM_REG_PPC_PMC1 | 32
1755 PPC | KVM_REG_PPC_PMC2 | 32
1756 PPC | KVM_REG_PPC_PMC3 | 32
1757 PPC | KVM_REG_PPC_PMC4 | 32
1758 PPC | KVM_REG_PPC_PMC5 | 32
1759 PPC | KVM_REG_PPC_PMC6 | 32
1760 PPC | KVM_REG_PPC_PMC7 | 32
1761 PPC | KVM_REG_PPC_PMC8 | 32
1762 PPC | KVM_REG_PPC_FPR0 | 64
1763 ...
1764 PPC | KVM_REG_PPC_FPR31 | 64
1765 PPC | KVM_REG_PPC_VR0 | 128
1766 ...
1767 PPC | KVM_REG_PPC_VR31 | 128
1768 PPC | KVM_REG_PPC_VSR0 | 128
1769 ...
1770 PPC | KVM_REG_PPC_VSR31 | 128
1771 PPC | KVM_REG_PPC_FPSCR | 64
1772 PPC | KVM_REG_PPC_VSCR | 32
1773 PPC | KVM_REG_PPC_VPA_ADDR | 64
1774 PPC | KVM_REG_PPC_VPA_SLB | 128
1775 PPC | KVM_REG_PPC_VPA_DTL | 128
1776 PPC | KVM_REG_PPC_EPCR | 32
1735 1777
17364.69 KVM_GET_ONE_REG 17784.69 KVM_GET_ONE_REG
1737 1779
@@ -1747,7 +1789,7 @@ kvm_one_reg struct passed in. On success, the register value can be found
1747at the memory location pointed to by "addr". 1789at the memory location pointed to by "addr".
1748 1790
1749The list of registers accessible using this interface is identical to the 1791The list of registers accessible using this interface is identical to the
1750list in 4.64. 1792list in 4.68.
1751 1793
1752 1794
17534.70 KVM_KVMCLOCK_CTRL 17954.70 KVM_KVMCLOCK_CTRL
@@ -1997,6 +2039,93 @@ return the hash table order in the parameter. (If the guest is using
1997the virtualized real-mode area (VRMA) facility, the kernel will 2039the virtualized real-mode area (VRMA) facility, the kernel will
1998re-create the VMRA HPTEs on the next KVM_RUN of any vcpu.) 2040re-create the VMRA HPTEs on the next KVM_RUN of any vcpu.)
1999 2041
20424.77 KVM_S390_INTERRUPT
2043
2044Capability: basic
2045Architectures: s390
2046Type: vm ioctl, vcpu ioctl
2047Parameters: struct kvm_s390_interrupt (in)
2048Returns: 0 on success, -1 on error
2049
2050Allows to inject an interrupt to the guest. Interrupts can be floating
2051(vm ioctl) or per cpu (vcpu ioctl), depending on the interrupt type.
2052
2053Interrupt parameters are passed via kvm_s390_interrupt:
2054
2055struct kvm_s390_interrupt {
2056 __u32 type;
2057 __u32 parm;
2058 __u64 parm64;
2059};
2060
2061type can be one of the following:
2062
2063KVM_S390_SIGP_STOP (vcpu) - sigp restart
2064KVM_S390_PROGRAM_INT (vcpu) - program check; code in parm
2065KVM_S390_SIGP_SET_PREFIX (vcpu) - sigp set prefix; prefix address in parm
2066KVM_S390_RESTART (vcpu) - restart
2067KVM_S390_INT_VIRTIO (vm) - virtio external interrupt; external interrupt
2068 parameters in parm and parm64
2069KVM_S390_INT_SERVICE (vm) - sclp external interrupt; sclp parameter in parm
2070KVM_S390_INT_EMERGENCY (vcpu) - sigp emergency; source cpu in parm
2071KVM_S390_INT_EXTERNAL_CALL (vcpu) - sigp external call; source cpu in parm
2072
2073Note that the vcpu ioctl is asynchronous to vcpu execution.
2074
20754.78 KVM_PPC_GET_HTAB_FD
2076
2077Capability: KVM_CAP_PPC_HTAB_FD
2078Architectures: powerpc
2079Type: vm ioctl
2080Parameters: Pointer to struct kvm_get_htab_fd (in)
2081Returns: file descriptor number (>= 0) on success, -1 on error
2082
2083This returns a file descriptor that can be used either to read out the
2084entries in the guest's hashed page table (HPT), or to write entries to
2085initialize the HPT. The returned fd can only be written to if the
2086KVM_GET_HTAB_WRITE bit is set in the flags field of the argument, and
2087can only be read if that bit is clear. The argument struct looks like
2088this:
2089
2090/* For KVM_PPC_GET_HTAB_FD */
2091struct kvm_get_htab_fd {
2092 __u64 flags;
2093 __u64 start_index;
2094 __u64 reserved[2];
2095};
2096
2097/* Values for kvm_get_htab_fd.flags */
2098#define KVM_GET_HTAB_BOLTED_ONLY ((__u64)0x1)
2099#define KVM_GET_HTAB_WRITE ((__u64)0x2)
2100
2101The `start_index' field gives the index in the HPT of the entry at
2102which to start reading. It is ignored when writing.
2103
2104Reads on the fd will initially supply information about all
2105"interesting" HPT entries. Interesting entries are those with the
2106bolted bit set, if the KVM_GET_HTAB_BOLTED_ONLY bit is set, otherwise
2107all entries. When the end of the HPT is reached, the read() will
2108return. If read() is called again on the fd, it will start again from
2109the beginning of the HPT, but will only return HPT entries that have
2110changed since they were last read.
2111
2112Data read or written is structured as a header (8 bytes) followed by a
2113series of valid HPT entries (16 bytes) each. The header indicates how
2114many valid HPT entries there are and how many invalid entries follow
2115the valid entries. The invalid entries are not represented explicitly
2116in the stream. The header format is:
2117
2118struct kvm_get_htab_header {
2119 __u32 index;
2120 __u16 n_valid;
2121 __u16 n_invalid;
2122};
2123
2124Writes to the fd create HPT entries starting at the index given in the
2125header; first `n_valid' valid entries with contents from the data
2126written, then `n_invalid' invalid entries, invalidating any previously
2127valid entries found.
2128
2000 2129
20015. The kvm_run structure 21305. The kvm_run structure
2002------------------------ 2131------------------------
@@ -2109,7 +2238,8 @@ executed a memory-mapped I/O instruction which could not be satisfied
2109by kvm. The 'data' member contains the written data if 'is_write' is 2238by kvm. The 'data' member contains the written data if 'is_write' is
2110true, and should be filled by application code otherwise. 2239true, and should be filled by application code otherwise.
2111 2240
2112NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO and KVM_EXIT_OSI, the corresponding 2241NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_DCR
2242 and KVM_EXIT_PAPR the corresponding
2113operations are complete (and guest state is consistent) only after userspace 2243operations are complete (and guest state is consistent) only after userspace
2114has re-entered the kernel with KVM_RUN. The kernel side will first finish 2244has re-entered the kernel with KVM_RUN. The kernel side will first finish
2115incomplete operations and then check for pending signals. Userspace 2245incomplete operations and then check for pending signals. Userspace