aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorChristoffer Dall <c.dall@virtualopensystems.com>2013-01-20 18:28:06 -0500
committerChristoffer Dall <c.dall@virtualopensystems.com>2013-01-23 13:29:10 -0500
commit749cf76c5a363e1383108a914ea09530bfa0bd43 (patch)
treea1bd85e41d1a8e6eb13529681431c3aea641d202 /Documentation
parent9e9a367c29cebd25a356d53414612e115efdadcf (diff)
KVM: ARM: Initial skeleton to compile KVM support
Targets KVM support for Cortex A-15 processors. Contains all the framework components, make files, header files, some tracing functionality, and basic user space API. Only supported core is Cortex-A15 for now. Most functionality is in arch/arm/kvm/* or arch/arm/include/asm/kvm_*.h. Reviewed-by: Will Deacon <will.deacon@arm.com> Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/virtual/kvm/api.txt57
1 files changed, 53 insertions, 4 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index a4df5535996b..4237c27ea612 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -293,7 +293,7 @@ kvm_run' (see below).
2934.11 KVM_GET_REGS 2934.11 KVM_GET_REGS
294 294
295Capability: basic 295Capability: basic
296Architectures: all 296Architectures: all except ARM
297Type: vcpu ioctl 297Type: vcpu ioctl
298Parameters: struct kvm_regs (out) 298Parameters: struct kvm_regs (out)
299Returns: 0 on success, -1 on error 299Returns: 0 on success, -1 on error
@@ -314,7 +314,7 @@ struct kvm_regs {
3144.12 KVM_SET_REGS 3144.12 KVM_SET_REGS
315 315
316Capability: basic 316Capability: basic
317Architectures: all 317Architectures: all except ARM
318Type: vcpu ioctl 318Type: vcpu ioctl
319Parameters: struct kvm_regs (in) 319Parameters: struct kvm_regs (in)
320Returns: 0 on success, -1 on error 320Returns: 0 on success, -1 on error
@@ -600,7 +600,7 @@ struct kvm_fpu {
6004.24 KVM_CREATE_IRQCHIP 6004.24 KVM_CREATE_IRQCHIP
601 601
602Capability: KVM_CAP_IRQCHIP 602Capability: KVM_CAP_IRQCHIP
603Architectures: x86, ia64 603Architectures: x86, ia64, ARM
604Type: vm ioctl 604Type: vm ioctl
605Parameters: none 605Parameters: none
606Returns: 0 on success, -1 on error 606Returns: 0 on success, -1 on error
@@ -608,7 +608,8 @@ Returns: 0 on success, -1 on error
608Creates an interrupt controller model in the kernel. On x86, creates a virtual 608Creates an interrupt controller model in the kernel. On x86, creates a virtual
609ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a 609ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a
610local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 610local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23
611only go to the IOAPIC. On ia64, a IOSAPIC is created. 611only go to the IOAPIC. On ia64, a IOSAPIC is created. On ARM, a GIC is
612created.
612 613
613 614
6144.25 KVM_IRQ_LINE 6154.25 KVM_IRQ_LINE
@@ -1775,6 +1776,14 @@ registers, find a list below:
1775 PPC | KVM_REG_PPC_VPA_DTL | 128 1776 PPC | KVM_REG_PPC_VPA_DTL | 128
1776 PPC | KVM_REG_PPC_EPCR | 32 1777 PPC | KVM_REG_PPC_EPCR | 32
1777 1778
1779ARM registers are mapped using the lower 32 bits. The upper 16 of that
1780is the register group type, or coprocessor number:
1781
1782ARM core registers have the following id bit patterns:
1783 0x4002 0000 0010 <index into the kvm_regs struct:16>
1784
1785
1786
17784.69 KVM_GET_ONE_REG 17874.69 KVM_GET_ONE_REG
1779 1788
1780Capability: KVM_CAP_ONE_REG 1789Capability: KVM_CAP_ONE_REG
@@ -2127,6 +2136,46 @@ written, then `n_invalid' invalid entries, invalidating any previously
2127valid entries found. 2136valid entries found.
2128 2137
2129 2138
21394.77 KVM_ARM_VCPU_INIT
2140
2141Capability: basic
2142Architectures: arm
2143Type: vcpu ioctl
2144Parameters: struct struct kvm_vcpu_init (in)
2145Returns: 0 on success; -1 on error
2146Errors:
2147  EINVAL:    the target is unknown, or the combination of features is invalid.
2148  ENOENT:    a features bit specified is unknown.
2149
2150This tells KVM what type of CPU to present to the guest, and what
2151optional features it should have.  This will cause a reset of the cpu
2152registers to their initial values.  If this is not called, KVM_RUN will
2153return ENOEXEC for that vcpu.
2154
2155Note that because some registers reflect machine topology, all vcpus
2156should be created before this ioctl is invoked.
2157
2158
21594.78 KVM_GET_REG_LIST
2160
2161Capability: basic
2162Architectures: arm
2163Type: vcpu ioctl
2164Parameters: struct kvm_reg_list (in/out)
2165Returns: 0 on success; -1 on error
2166Errors:
2167  E2BIG:     the reg index list is too big to fit in the array specified by
2168             the user (the number required will be written into n).
2169
2170struct kvm_reg_list {
2171 __u64 n; /* number of registers in reg[] */
2172 __u64 reg[0];
2173};
2174
2175This ioctl returns the guest registers that are supported for the
2176KVM_GET_ONE_REG/KVM_SET_ONE_REG calls.
2177
2178
21305. The kvm_run structure 21795. The kvm_run structure
2131------------------------ 2180------------------------
2132 2181