diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-30 18:36:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-30 18:36:45 -0400 |
commit | 1bc87b00556e8f7ba30a1010471951c5b8f71114 (patch) | |
tree | e73c2d187e2dff0df97ed82e32b45e362b923117 /Documentation | |
parent | acff987d94cbdb4049f3706bed1f1792f8ef6837 (diff) | |
parent | f1c1da2bde712812a3e0f9a7a7ebe7a916a4b5f4 (diff) |
Merge branch 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm
* 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (75 commits)
KVM: SVM: Keep intercepting task switching with NPT enabled
KVM: s390: implement sigp external call
KVM: s390: fix register setting
KVM: s390: fix return value of kvm_arch_init_vm
KVM: s390: check cpu_id prior to using it
KVM: emulate lapic tsc deadline timer for guest
x86: TSC deadline definitions
KVM: Fix simultaneous NMIs
KVM: x86 emulator: convert push %sreg/pop %sreg to direct decode
KVM: x86 emulator: switch lds/les/lss/lfs/lgs to direct decode
KVM: x86 emulator: streamline decode of segment registers
KVM: x86 emulator: simplify OpMem64 decode
KVM: x86 emulator: switch src decode to decode_operand()
KVM: x86 emulator: qualify OpReg inhibit_byte_regs hack
KVM: x86 emulator: switch OpImmUByte decode to decode_imm()
KVM: x86 emulator: free up some flag bits near src, dst
KVM: x86 emulator: switch src2 to generic decode_operand()
KVM: x86 emulator: expand decode flags to 64 bits
KVM: x86 emulator: split dst decode to a generic decode_operand()
KVM: x86 emulator: move memop, memopp into emulation context
...
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/kernel-parameters.txt | 4 | ||||
-rw-r--r-- | Documentation/virtual/kvm/api.txt | 71 |
2 files changed, 73 insertions, 2 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 93413ce96883..27e0488d54d2 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1201,6 +1201,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1201 | [KVM,Intel] Disable FlexPriority feature (TPR shadow). | 1201 | [KVM,Intel] Disable FlexPriority feature (TPR shadow). |
1202 | Default is 1 (enabled) | 1202 | Default is 1 (enabled) |
1203 | 1203 | ||
1204 | kvm-intel.nested= | ||
1205 | [KVM,Intel] Enable VMX nesting (nVMX). | ||
1206 | Default is 0 (disabled) | ||
1207 | |||
1204 | kvm-intel.unrestricted_guest= | 1208 | kvm-intel.unrestricted_guest= |
1205 | [KVM,Intel] Disable unrestricted guest feature | 1209 | [KVM,Intel] Disable unrestricted guest feature |
1206 | (virtualized real and unpaged mode) on capable | 1210 | (virtualized real and unpaged mode) on capable |
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index b0e4b9cd6a66..7945b0bd35e2 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
@@ -175,10 +175,30 @@ Parameters: vcpu id (apic id on x86) | |||
175 | Returns: vcpu fd on success, -1 on error | 175 | Returns: vcpu fd on success, -1 on error |
176 | 176 | ||
177 | This API adds a vcpu to a virtual machine. The vcpu id is a small integer | 177 | This API adds a vcpu to a virtual machine. The vcpu id is a small integer |
178 | in the range [0, max_vcpus). You can use KVM_CAP_NR_VCPUS of the | 178 | in the range [0, max_vcpus). |
179 | KVM_CHECK_EXTENSION ioctl() to determine the value for max_vcpus at run-time. | 179 | |
180 | The recommended max_vcpus value can be retrieved using the KVM_CAP_NR_VCPUS of | ||
181 | the KVM_CHECK_EXTENSION ioctl() at run-time. | ||
182 | The maximum possible value for max_vcpus can be retrieved using the | ||
183 | KVM_CAP_MAX_VCPUS of the KVM_CHECK_EXTENSION ioctl() at run-time. | ||
184 | |||
180 | If the KVM_CAP_NR_VCPUS does not exist, you should assume that max_vcpus is 4 | 185 | If the KVM_CAP_NR_VCPUS does not exist, you should assume that max_vcpus is 4 |
181 | cpus max. | 186 | cpus max. |
187 | If the KVM_CAP_MAX_VCPUS does not exist, you should assume that max_vcpus is | ||
188 | same as the value returned from KVM_CAP_NR_VCPUS. | ||
189 | |||
190 | On powerpc using book3s_hv mode, the vcpus are mapped onto virtual | ||
191 | threads in one or more virtual CPU cores. (This is because the | ||
192 | hardware requires all the hardware threads in a CPU core to be in the | ||
193 | same partition.) The KVM_CAP_PPC_SMT capability indicates the number | ||
194 | of vcpus per virtual core (vcore). The vcore id is obtained by | ||
195 | dividing the vcpu id by the number of vcpus per vcore. The vcpus in a | ||
196 | given vcore will always be in the same physical core as each other | ||
197 | (though that might be a different physical core from time to time). | ||
198 | Userspace can control the threading (SMT) mode of the guest by its | ||
199 | allocation of vcpu ids. For example, if userspace wants | ||
200 | single-threaded guest vcpus, it should make all vcpu ids be a multiple | ||
201 | of the number of vcpus per vcore. | ||
182 | 202 | ||
183 | On powerpc using book3s_hv mode, the vcpus are mapped onto virtual | 203 | On powerpc using book3s_hv mode, the vcpus are mapped onto virtual |
184 | threads in one or more virtual CPU cores. (This is because the | 204 | threads in one or more virtual CPU cores. (This is because the |
@@ -1633,3 +1653,50 @@ developer registration required to access it). | |||
1633 | char padding[256]; | 1653 | char padding[256]; |
1634 | }; | 1654 | }; |
1635 | }; | 1655 | }; |
1656 | |||
1657 | 6. Capabilities that can be enabled | ||
1658 | |||
1659 | There are certain capabilities that change the behavior of the virtual CPU when | ||
1660 | enabled. To enable them, please see section 4.37. Below you can find a list of | ||
1661 | capabilities and what their effect on the vCPU is when enabling them. | ||
1662 | |||
1663 | The following information is provided along with the description: | ||
1664 | |||
1665 | Architectures: which instruction set architectures provide this ioctl. | ||
1666 | x86 includes both i386 and x86_64. | ||
1667 | |||
1668 | Parameters: what parameters are accepted by the capability. | ||
1669 | |||
1670 | Returns: the return value. General error numbers (EBADF, ENOMEM, EINVAL) | ||
1671 | are not detailed, but errors with specific meanings are. | ||
1672 | |||
1673 | 6.1 KVM_CAP_PPC_OSI | ||
1674 | |||
1675 | Architectures: ppc | ||
1676 | Parameters: none | ||
1677 | Returns: 0 on success; -1 on error | ||
1678 | |||
1679 | This capability enables interception of OSI hypercalls that otherwise would | ||
1680 | be treated as normal system calls to be injected into the guest. OSI hypercalls | ||
1681 | were invented by Mac-on-Linux to have a standardized communication mechanism | ||
1682 | between the guest and the host. | ||
1683 | |||
1684 | When this capability is enabled, KVM_EXIT_OSI can occur. | ||
1685 | |||
1686 | 6.2 KVM_CAP_PPC_PAPR | ||
1687 | |||
1688 | Architectures: ppc | ||
1689 | Parameters: none | ||
1690 | Returns: 0 on success; -1 on error | ||
1691 | |||
1692 | This capability enables interception of PAPR hypercalls. PAPR hypercalls are | ||
1693 | done using the hypercall instruction "sc 1". | ||
1694 | |||
1695 | It also sets the guest privilege level to "supervisor" mode. Usually the guest | ||
1696 | runs in "hypervisor" privilege mode with a few missing features. | ||
1697 | |||
1698 | In addition to the above, it changes the semantics of SDR1. In this mode, the | ||
1699 | HTAB address part of SDR1 contains an HVA instead of a GPA, as PAPR keeps the | ||
1700 | HTAB invisible to the guest. | ||
1701 | |||
1702 | When this capability is enabled, KVM_EXIT_PAPR_HCALL can occur. | ||