aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-10-30 18:36:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-10-30 18:36:45 -0400
commit1bc87b00556e8f7ba30a1010471951c5b8f71114 (patch)
treee73c2d187e2dff0df97ed82e32b45e362b923117 /Documentation
parentacff987d94cbdb4049f3706bed1f1792f8ef6837 (diff)
parentf1c1da2bde712812a3e0f9a7a7ebe7a916a4b5f4 (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.txt4
-rw-r--r--Documentation/virtual/kvm/api.txt71
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)
175Returns: vcpu fd on success, -1 on error 175Returns: vcpu fd on success, -1 on error
176 176
177This API adds a vcpu to a virtual machine. The vcpu id is a small integer 177This API adds a vcpu to a virtual machine. The vcpu id is a small integer
178in the range [0, max_vcpus). You can use KVM_CAP_NR_VCPUS of the 178in the range [0, max_vcpus).
179KVM_CHECK_EXTENSION ioctl() to determine the value for max_vcpus at run-time. 179
180The recommended max_vcpus value can be retrieved using the KVM_CAP_NR_VCPUS of
181the KVM_CHECK_EXTENSION ioctl() at run-time.
182The maximum possible value for max_vcpus can be retrieved using the
183KVM_CAP_MAX_VCPUS of the KVM_CHECK_EXTENSION ioctl() at run-time.
184
180If the KVM_CAP_NR_VCPUS does not exist, you should assume that max_vcpus is 4 185If the KVM_CAP_NR_VCPUS does not exist, you should assume that max_vcpus is 4
181cpus max. 186cpus max.
187If the KVM_CAP_MAX_VCPUS does not exist, you should assume that max_vcpus is
188same as the value returned from KVM_CAP_NR_VCPUS.
189
190On powerpc using book3s_hv mode, the vcpus are mapped onto virtual
191threads in one or more virtual CPU cores. (This is because the
192hardware requires all the hardware threads in a CPU core to be in the
193same partition.) The KVM_CAP_PPC_SMT capability indicates the number
194of vcpus per virtual core (vcore). The vcore id is obtained by
195dividing the vcpu id by the number of vcpus per vcore. The vcpus in a
196given 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).
198Userspace can control the threading (SMT) mode of the guest by its
199allocation of vcpu ids. For example, if userspace wants
200single-threaded guest vcpus, it should make all vcpu ids be a multiple
201of the number of vcpus per vcore.
182 202
183On powerpc using book3s_hv mode, the vcpus are mapped onto virtual 203On powerpc using book3s_hv mode, the vcpus are mapped onto virtual
184threads in one or more virtual CPU cores. (This is because the 204threads 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
16576. Capabilities that can be enabled
1658
1659There are certain capabilities that change the behavior of the virtual CPU when
1660enabled. To enable them, please see section 4.37. Below you can find a list of
1661capabilities and what their effect on the vCPU is when enabling them.
1662
1663The 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
16736.1 KVM_CAP_PPC_OSI
1674
1675Architectures: ppc
1676Parameters: none
1677Returns: 0 on success; -1 on error
1678
1679This capability enables interception of OSI hypercalls that otherwise would
1680be treated as normal system calls to be injected into the guest. OSI hypercalls
1681were invented by Mac-on-Linux to have a standardized communication mechanism
1682between the guest and the host.
1683
1684When this capability is enabled, KVM_EXIT_OSI can occur.
1685
16866.2 KVM_CAP_PPC_PAPR
1687
1688Architectures: ppc
1689Parameters: none
1690Returns: 0 on success; -1 on error
1691
1692This capability enables interception of PAPR hypercalls. PAPR hypercalls are
1693done using the hypercall instruction "sc 1".
1694
1695It also sets the guest privilege level to "supervisor" mode. Usually the guest
1696runs in "hypervisor" privilege mode with a few missing features.
1697
1698In addition to the above, it changes the semantics of SDR1. In this mode, the
1699HTAB address part of SDR1 contains an HVA instead of a GPA, as PAPR keeps the
1700HTAB invisible to the guest.
1701
1702When this capability is enabled, KVM_EXIT_PAPR_HCALL can occur.