summaryrefslogtreecommitdiffstats
path: root/Documentation/kvm
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'kvm-updates/2.6.38' of git://git.kernel.org/pub/scm/virt/kvm/kvmLinus Torvalds2011-01-133-1/+216
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'kvm-updates/2.6.38' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (142 commits) KVM: Initialize fpu state in preemptible context KVM: VMX: when entering real mode align segment base to 16 bytes KVM: MMU: handle 'map_writable' in set_spte() function KVM: MMU: audit: allow audit more guests at the same time KVM: Fetch guest cr3 from hardware on demand KVM: Replace reads of vcpu->arch.cr3 by an accessor KVM: MMU: only write protect mappings at pagetable level KVM: VMX: Correct asm constraint in vmcs_load()/vmcs_clear() KVM: MMU: Initialize base_role for tdp mmus KVM: VMX: Optimize atomic EFER load KVM: VMX: Add definitions for more vm entry/exit control bits KVM: SVM: copy instruction bytes from VMCB KVM: SVM: implement enhanced INVLPG intercept KVM: SVM: enhance mov DR intercept handler KVM: SVM: enhance MOV CR intercept handler KVM: SVM: add new SVM feature bit names KVM: cleanup emulate_instruction KVM: move complete_insn_gp() into x86.c KVM: x86: fix CR8 handling KVM guest: Fix kvm clock initialization when it's configured out ...
| * KVM: Document device assigment APIJan Kiszka2011-01-121-0/+178
| | | | | | | | | | | | | | | | | | | | | | Adds API documentation for KVM_[DE]ASSIGN_PCI_DEVICE, KVM_[DE]ASSIGN_DEV_IRQ, KVM_SET_GSI_ROUTING, KVM_ASSIGN_SET_MSIX_NR, and KVM_ASSIGN_SET_MSIX_ENTRY. Acked-by: Alex Williamson <alex.williamson@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * KVM: Let host know whether the guest can handle async PF in non-userspace ↵Gleb Natapov2011-01-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | context. If guest can detect that it runs in non-preemptable context it can handle async PFs at any time, so let host know that it can send async PF even if guest cpu is not in userspace. Acked-by: Rik van Riel <riel@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * KVM: Add PV MSR to enable asynchronous page faults delivery.Gleb Natapov2011-01-122-1/+37
| | | | | | | | | | | | | | | | Guest enables async PF vcpu functionality using this MSR. Reviewed-by: Rik van Riel <riel@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* | tree-wide: fix comment/printk typosUwe Kleine-König2010-11-011-1/+1
|/ | | | | | | | | | "gadget", "through", "command", "maintain", "maintain", "controller", "address", "between", "initiali[zs]e", "instead", "function", "select", "already", "equal", "access", "management", "hierarchy", "registration", "interest", "relative", "memory", "offset", "already", Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* KVM: Document that KVM_GET_SUPPORTED_CPUID may return emulated valuesAvi Kivity2010-10-241-2/+3
| | | | Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: PPC: Add documentation for magic page enhancementsAlexander Graf2010-10-241-0/+14
| | | | | | | This documents how to detect additional features inside the magic page when a guest maps it. Signed-off-by: Alexander Graf <agraf@suse.de>
* KVM: PPC: Document KVM_INTERRUPT ioctlAlexander Graf2010-10-241-2/+31
| | | | | | | This adds some documentation for the KVM_INTERRUPT special cases that PowerPC now implements. Signed-off-by: Alexander Graf <agraf@suse.de>
* KVM: PPC: Add mtsrin PV codeAlexander Graf2010-10-241-0/+3
| | | | | | | | This is the guest side of the mtsr acceleration. Using this a guest can now call mtsrin with almost no overhead as long as it ensures that it only uses it with (MSR_IR|MSR_DR) == 0. Linux does that, so we're good. Signed-off-by: Alexander Graf <agraf@suse.de>
* KVM: x86: Add timekeeping documentationZachary Amsden2010-10-241-0/+612
| | | | | | | | Basic informational document about x86 timekeeping and how KVM is affected. Signed-off-by: Zachary Amsden <zamsden@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* KVM: PPC: Add get_pvinfo interface to query hypercall instructionsAlexander Graf2010-10-241-0/+23
| | | | | | | | | | | | | | | We need to tell the guest the opcodes that make up a hypercall through interfaces that are controlled by userspace. So we need to add a call for userspace to allow it to query those opcodes so it can pass them on. This is required because the hypercall opcodes can change based on the hypervisor conditions. If we're running in hardware accelerated hypervisor mode, a hypercall looks different from when we're running without hardware acceleration. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: PPC: Add Documentation about PV interfaceAlexander Graf2010-10-241-0/+179
| | | | | | | | | We just introduced a new PV interface that screams for documentation. So here it is - a shiny new and awesome text file describing the internal works of the PPC KVM paravirtual interface. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: Document KVM_GET_SUPPORTED_CPUID2 ioctlAvi Kivity2010-08-021-0/+64
| | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* KVM: Document MCE banks non-exposure via KVM_GET_MSR_INDEX_LISTAvi Kivity2010-08-021-0/+4
| | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* KVM: Document KVM specific review itemsAvi Kivity2010-08-011-0/+38
| | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* KVM: Remove kernel-allocated memory regionsAvi Kivity2010-08-011-23/+1
| | | | | | | Equivalent (and better) functionality is provided by user-allocated memory regions. Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: Remove memory alias supportAvi Kivity2010-08-011-11/+1
| | | | | | | As advertised in feature-removal-schedule.txt. Equivalent support is provided by overlapping memory regions. Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: Fix typos in Documentation/kvm/mmu.txtJason Wang2010-08-011-2/+2
| | | | | Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* KVM: x86: XSAVE/XRSTOR live migration supportSheng Yang2010-08-011-0/+74
| | | | | | | This patch enable save/restore of xsave state. Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* KVM: Add Documentation/kvm/msr.txtGlauber Costa2010-08-011-0/+153
| | | | | | | | | This patch adds a file that documents the usage of KVM-specific MSRs. Signed-off-by: Glauber Costa <glommer@redhat.com> Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* KVM: MMU: Document large pagesAvi Kivity2010-08-011-0/+23
| | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* KVM: MMU: Document cr0.wp emulationAvi Kivity2010-08-011-0/+19
| | | | Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: MMU: Don't allocate gfns page for direct mmu pagesLai Jiangshan2010-08-011-1/+3
| | | | | | | | | | | | | | | | | | | When sp->role.direct is set, sp->gfns does not contain any essential information, leaf sptes reachable from this sp are for a continuous guest physical memory range (a linear range). So sp->gfns[i] (if it was set) equals to sp->gfn + i. (PT_PAGE_TABLE_LEVEL) Obviously, it is not essential information, we can calculate it when need. It means we don't need sp->gfns when sp->role.direct=1, Thus we can save one page usage for every kvm_mmu_page. Note: Access to sp->gfns must be wrapped by kvm_mmu_page_get_gfn() or kvm_mmu_page_set_gfn(). It is only exposed in FNAME(sync_page). Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: update mmu documetation for role.nxeGui Jianfeng2010-08-011-1/+1
| | | | | | | | There's no member "cr4_nxe" in struct kvm_mmu_page_role, it names "nxe" now. Update mmu document. Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* KVM: Document KVM_SET_BOOT_CPU_IDAvi Kivity2010-08-011-0/+12
| | | | Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: Document KVM_SET_IDENTITY_MAP ioctlAvi Kivity2010-08-011-0/+18
| | | | Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: MMU: Segregate shadow pages with different cr0.wpAvi Kivity2010-05-191-0/+2
| | | | | | | | | | | | When cr0.wp=0, we may shadow a gpte having u/s=1 and r/w=0 with an spte having u/s=0 and r/w=1. This allows excessive access if the guest sets cr0.wp=1 and accesses through this spte. Fix by making cr0.wp part of the base role; we'll have different sptes for the two cases and the problem disappears. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* KVM: Add cpuid.txt fileGlauber Costa2010-05-191-0/+42
| | | | | | | | This file documents cpuid bits used by KVM. Signed-off-by: Glauber Costa <glommer@redhat.com> Acked-by: Zachary Amsden <zamsden@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* KVM: Minor MMU documentation editsAvi Kivity2010-05-171-5/+5
| | | | | | | Reported by Andrew Jones. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* KVM: Document KVM_GET_MP_STATE and KVM_SET_MP_STATEAvi Kivity2010-05-171-0/+44
| | | | | | Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* KVM: Document mmuAvi Kivity2010-05-171-0/+302
| | | | Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: Document replacements for KVM_EXIT_HYPERCALLAvi Kivity2010-05-171-1/+3
| | | | Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: PPC: Add OSI hypercall interfaceAlexander Graf2010-05-171-3/+16
| | | | | | | | | | | | | MOL uses its own hypercall interface to call back into userspace when the guest wants to do something. So let's implement that as an exit reason, specify it with a CAP and only really use it when userspace wants us to. The only user of it so far is MOL. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: Add support for enabling capabilities per-vcpuAlexander Graf2010-05-171-0/+35
| | | | | | | | | | | | | | Some times we don't want all capabilities to be available to all our vcpus. One example for that is the OSI interface, implemented in the next patch. In order to have a generic mechanism in how to enable capabilities individually, this patch introduces a new ioctl that can be used for this purpose. That way features we don't want in all guests or userspace configurations can just not be enabled and we're good. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: Document KVM_SET_TSS_ADDRAvi Kivity2010-05-171-0/+18
| | | | Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: Document KVM_SET_USER_MEMORY_REGIONAvi Kivity2010-05-171-0/+45
| | | | | Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: x86: Add support for saving&restoring debug registersJan Kiszka2010-04-251-0/+31
| | | | | | | | So far user space was not able to save and restore debug registers for migration or after reset. Plug this hole. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: x86: Save&restore interrupt shadow maskJan Kiszka2010-04-251-1/+10
| | | | | | | | | | | | | The interrupt shadow created by STI or MOV-SS-like operations is part of the VCPU state and must be preserved across migration. Transfer it in the spare padding field of kvm_vcpu_events.interrupt. As a side effect we now have to make vmx_set_interrupt_shadow robust against both shadow types being set. Give MOV SS a higher priority and skip STI in that case to avoid that VMX throws a fault on next entry. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: add doc note about PIO/MMIO completion APIMarcelo Tosatti2010-04-251-0/+7
| | | | | | | | | Document that partially emulated instructions leave the guest state inconsistent, and that the kernel will complete operations before checking for pending signals. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: trivial document fixesWu Fengguang2010-03-011-6/+6
| | | | | Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* KVM: x86: Extend KVM_SET_VCPU_EVENTS with selective updatesJan Kiszka2009-12-271-1/+9
| | | | | | | | | | | User space may not want to overwrite asynchronously changing VCPU event states on write-back. So allow to skip nmi.pending and sipi_vector by setting corresponding bits in the flags field of kvm_vcpu_events. [avi: advertise the bits in KVM_GET_VCPU_EVENTS] Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: x86: Add KVM_GET/SET_VCPU_EVENTSJan Kiszka2009-12-031-0/+49
| | | | | | | | | | | | This new IOCTL exports all yet user-invisible states related to exceptions, interrupts, and NMIs. Together with appropriate user space changes, this fixes sporadic problems of vmsave/restore, live migration and system reset. [avi: future-proof abi by adding a flags field] Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: allow userspace to adjust kvmclock offsetGlauber Costa2009-12-031-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | When we migrate a kvm guest that uses pvclock between two hosts, we may suffer a large skew. This is because there can be significant differences between the monotonic clock of the hosts involved. When a new host with a much larger monotonic time starts running the guest, the view of time will be significantly impacted. Situation is much worse when we do the opposite, and migrate to a host with a smaller monotonic clock. This proposed ioctl will allow userspace to inform us what is the monotonic clock value in the source host, so we can keep the time skew short, and more importantly, never goes backwards. Userspace may also need to trigger the current data, since from the first migration onwards, it won't be reflected by a simple call to clock_gettime() anymore. [marcelo: future-proof abi with a flags field] [jan: fix KVM_GET_CLOCK by clearing flags field instead of checking it] Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: Xen PV-on-HVM guest supportEd Swierk2009-12-031-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Support for Xen PV-on-HVM guests can be implemented almost entirely in userspace, except for handling one annoying MSR that maps a Xen hypercall blob into guest address space. A generic mechanism to delegate MSR writes to userspace seems overkill and risks encouraging similar MSR abuse in the future. Thus this patch adds special support for the Xen HVM MSR. I implemented a new ioctl, KVM_XEN_HVM_CONFIG, that lets userspace tell KVM which MSR the guest will write to, as well as the starting address and size of the hypercall blobs (one each for 32-bit and 64-bit) that userspace has loaded from files. When the guest writes to the MSR, KVM copies one page of the blob from userspace to the guest. I've tested this patch with a hacked-up version of Gerd's userspace code, booting a number of guests (CentOS 5.3 i386 and x86_64, and FreeBSD 8.0-RC1 amd64) and exercising PV network and block devices. [jan: fix i386 build warning] [avi: future proof abi with a flags field] Signed-off-by: Ed Swierk <eswierk@aristanetworks.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: Document KVM_CAP_IRQCHIPAvi Kivity2009-09-101-0/+76
| | | | Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: Document basic APIAvi Kivity2009-09-101-0/+683
Document the basic API corresponding to the 2.6.22 release. Signed-off-by: Avi Kivity <avi@redhat.com>