diff options
author | Christoffer Dall <c.dall@virtualopensystems.com> | 2013-01-20 18:28:06 -0500 |
---|---|---|
committer | Christoffer Dall <c.dall@virtualopensystems.com> | 2013-01-23 13:29:10 -0500 |
commit | 749cf76c5a363e1383108a914ea09530bfa0bd43 (patch) | |
tree | a1bd85e41d1a8e6eb13529681431c3aea641d202 /Documentation | |
parent | 9e9a367c29cebd25a356d53414612e115efdadcf (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.txt | 57 |
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). | |||
293 | 4.11 KVM_GET_REGS | 293 | 4.11 KVM_GET_REGS |
294 | 294 | ||
295 | Capability: basic | 295 | Capability: basic |
296 | Architectures: all | 296 | Architectures: all except ARM |
297 | Type: vcpu ioctl | 297 | Type: vcpu ioctl |
298 | Parameters: struct kvm_regs (out) | 298 | Parameters: struct kvm_regs (out) |
299 | Returns: 0 on success, -1 on error | 299 | Returns: 0 on success, -1 on error |
@@ -314,7 +314,7 @@ struct kvm_regs { | |||
314 | 4.12 KVM_SET_REGS | 314 | 4.12 KVM_SET_REGS |
315 | 315 | ||
316 | Capability: basic | 316 | Capability: basic |
317 | Architectures: all | 317 | Architectures: all except ARM |
318 | Type: vcpu ioctl | 318 | Type: vcpu ioctl |
319 | Parameters: struct kvm_regs (in) | 319 | Parameters: struct kvm_regs (in) |
320 | Returns: 0 on success, -1 on error | 320 | Returns: 0 on success, -1 on error |
@@ -600,7 +600,7 @@ struct kvm_fpu { | |||
600 | 4.24 KVM_CREATE_IRQCHIP | 600 | 4.24 KVM_CREATE_IRQCHIP |
601 | 601 | ||
602 | Capability: KVM_CAP_IRQCHIP | 602 | Capability: KVM_CAP_IRQCHIP |
603 | Architectures: x86, ia64 | 603 | Architectures: x86, ia64, ARM |
604 | Type: vm ioctl | 604 | Type: vm ioctl |
605 | Parameters: none | 605 | Parameters: none |
606 | Returns: 0 on success, -1 on error | 606 | Returns: 0 on success, -1 on error |
@@ -608,7 +608,8 @@ Returns: 0 on success, -1 on error | |||
608 | Creates an interrupt controller model in the kernel. On x86, creates a virtual | 608 | Creates an interrupt controller model in the kernel. On x86, creates a virtual |
609 | ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a | 609 | ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a |
610 | local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 | 610 | local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 |
611 | only go to the IOAPIC. On ia64, a IOSAPIC is created. | 611 | only go to the IOAPIC. On ia64, a IOSAPIC is created. On ARM, a GIC is |
612 | created. | ||
612 | 613 | ||
613 | 614 | ||
614 | 4.25 KVM_IRQ_LINE | 615 | 4.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 | ||
1779 | ARM registers are mapped using the lower 32 bits. The upper 16 of that | ||
1780 | is the register group type, or coprocessor number: | ||
1781 | |||
1782 | ARM core registers have the following id bit patterns: | ||
1783 | 0x4002 0000 0010 <index into the kvm_regs struct:16> | ||
1784 | |||
1785 | |||
1786 | |||
1778 | 4.69 KVM_GET_ONE_REG | 1787 | 4.69 KVM_GET_ONE_REG |
1779 | 1788 | ||
1780 | Capability: KVM_CAP_ONE_REG | 1789 | Capability: KVM_CAP_ONE_REG |
@@ -2127,6 +2136,46 @@ written, then `n_invalid' invalid entries, invalidating any previously | |||
2127 | valid entries found. | 2136 | valid entries found. |
2128 | 2137 | ||
2129 | 2138 | ||
2139 | 4.77 KVM_ARM_VCPU_INIT | ||
2140 | |||
2141 | Capability: basic | ||
2142 | Architectures: arm | ||
2143 | Type: vcpu ioctl | ||
2144 | Parameters: struct struct kvm_vcpu_init (in) | ||
2145 | Returns: 0 on success; -1 on error | ||
2146 | Errors: | ||
2147 | EINVAL: the target is unknown, or the combination of features is invalid. | ||
2148 | ENOENT: a features bit specified is unknown. | ||
2149 | |||
2150 | This tells KVM what type of CPU to present to the guest, and what | ||
2151 | optional features it should have. This will cause a reset of the cpu | ||
2152 | registers to their initial values. If this is not called, KVM_RUN will | ||
2153 | return ENOEXEC for that vcpu. | ||
2154 | |||
2155 | Note that because some registers reflect machine topology, all vcpus | ||
2156 | should be created before this ioctl is invoked. | ||
2157 | |||
2158 | |||
2159 | 4.78 KVM_GET_REG_LIST | ||
2160 | |||
2161 | Capability: basic | ||
2162 | Architectures: arm | ||
2163 | Type: vcpu ioctl | ||
2164 | Parameters: struct kvm_reg_list (in/out) | ||
2165 | Returns: 0 on success; -1 on error | ||
2166 | Errors: | ||
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 | |||
2170 | struct kvm_reg_list { | ||
2171 | __u64 n; /* number of registers in reg[] */ | ||
2172 | __u64 reg[0]; | ||
2173 | }; | ||
2174 | |||
2175 | This ioctl returns the guest registers that are supported for the | ||
2176 | KVM_GET_ONE_REG/KVM_SET_ONE_REG calls. | ||
2177 | |||
2178 | |||
2130 | 5. The kvm_run structure | 2179 | 5. The kvm_run structure |
2131 | ------------------------ | 2180 | ------------------------ |
2132 | 2181 | ||