diff options
47 files changed, 1012 insertions, 703 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 1490eb0ef798..57d25fdd3d7e 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
| @@ -997,7 +997,7 @@ for vm-wide capabilities. | |||
| 997 | 4.38 KVM_GET_MP_STATE | 997 | 4.38 KVM_GET_MP_STATE |
| 998 | 998 | ||
| 999 | Capability: KVM_CAP_MP_STATE | 999 | Capability: KVM_CAP_MP_STATE |
| 1000 | Architectures: x86, s390 | 1000 | Architectures: x86, s390, arm, arm64 |
| 1001 | Type: vcpu ioctl | 1001 | Type: vcpu ioctl |
| 1002 | Parameters: struct kvm_mp_state (out) | 1002 | Parameters: struct kvm_mp_state (out) |
| 1003 | Returns: 0 on success; -1 on error | 1003 | Returns: 0 on success; -1 on error |
| @@ -1011,7 +1011,7 @@ uniprocessor guests). | |||
| 1011 | 1011 | ||
| 1012 | Possible values are: | 1012 | Possible values are: |
| 1013 | 1013 | ||
| 1014 | - KVM_MP_STATE_RUNNABLE: the vcpu is currently running [x86] | 1014 | - KVM_MP_STATE_RUNNABLE: the vcpu is currently running [x86,arm/arm64] |
| 1015 | - KVM_MP_STATE_UNINITIALIZED: the vcpu is an application processor (AP) | 1015 | - KVM_MP_STATE_UNINITIALIZED: the vcpu is an application processor (AP) |
| 1016 | which has not yet received an INIT signal [x86] | 1016 | which has not yet received an INIT signal [x86] |
| 1017 | - KVM_MP_STATE_INIT_RECEIVED: the vcpu has received an INIT signal, and is | 1017 | - KVM_MP_STATE_INIT_RECEIVED: the vcpu has received an INIT signal, and is |
| @@ -1020,7 +1020,7 @@ Possible values are: | |||
| 1020 | is waiting for an interrupt [x86] | 1020 | is waiting for an interrupt [x86] |
| 1021 | - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector | 1021 | - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector |
| 1022 | accessible via KVM_GET_VCPU_EVENTS) [x86] | 1022 | accessible via KVM_GET_VCPU_EVENTS) [x86] |
| 1023 | - KVM_MP_STATE_STOPPED: the vcpu is stopped [s390] | 1023 | - KVM_MP_STATE_STOPPED: the vcpu is stopped [s390,arm/arm64] |
| 1024 | - KVM_MP_STATE_CHECK_STOP: the vcpu is in a special error state [s390] | 1024 | - KVM_MP_STATE_CHECK_STOP: the vcpu is in a special error state [s390] |
| 1025 | - KVM_MP_STATE_OPERATING: the vcpu is operating (running or halted) | 1025 | - KVM_MP_STATE_OPERATING: the vcpu is operating (running or halted) |
| 1026 | [s390] | 1026 | [s390] |
| @@ -1031,11 +1031,15 @@ On x86, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an | |||
| 1031 | in-kernel irqchip, the multiprocessing state must be maintained by userspace on | 1031 | in-kernel irqchip, the multiprocessing state must be maintained by userspace on |
| 1032 | these architectures. | 1032 | these architectures. |
| 1033 | 1033 | ||
| 1034 | For arm/arm64: | ||
| 1035 | |||
| 1036 | The only states that are valid are KVM_MP_STATE_STOPPED and | ||
| 1037 | KVM_MP_STATE_RUNNABLE which reflect if the vcpu is paused or not. | ||
| 1034 | 1038 | ||
| 1035 | 4.39 KVM_SET_MP_STATE | 1039 | 4.39 KVM_SET_MP_STATE |
| 1036 | 1040 | ||
| 1037 | Capability: KVM_CAP_MP_STATE | 1041 | Capability: KVM_CAP_MP_STATE |
| 1038 | Architectures: x86, s390 | 1042 | Architectures: x86, s390, arm, arm64 |
| 1039 | Type: vcpu ioctl | 1043 | Type: vcpu ioctl |
| 1040 | Parameters: struct kvm_mp_state (in) | 1044 | Parameters: struct kvm_mp_state (in) |
| 1041 | Returns: 0 on success; -1 on error | 1045 | Returns: 0 on success; -1 on error |
| @@ -1047,6 +1051,10 @@ On x86, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an | |||
| 1047 | in-kernel irqchip, the multiprocessing state must be maintained by userspace on | 1051 | in-kernel irqchip, the multiprocessing state must be maintained by userspace on |
| 1048 | these architectures. | 1052 | these architectures. |
| 1049 | 1053 | ||
| 1054 | For arm/arm64: | ||
| 1055 | |||
| 1056 | The only states that are valid are KVM_MP_STATE_STOPPED and | ||
| 1057 | KVM_MP_STATE_RUNNABLE which reflect if the vcpu should be paused or not. | ||
| 1050 | 1058 | ||
| 1051 | 4.40 KVM_SET_IDENTITY_MAP_ADDR | 1059 | 4.40 KVM_SET_IDENTITY_MAP_ADDR |
| 1052 | 1060 | ||
| @@ -2263,7 +2271,7 @@ into the hash PTE second double word). | |||
| 2263 | 4.75 KVM_IRQFD | 2271 | 4.75 KVM_IRQFD |
| 2264 | 2272 | ||
| 2265 | Capability: KVM_CAP_IRQFD | 2273 | Capability: KVM_CAP_IRQFD |
| 2266 | Architectures: x86 s390 | 2274 | Architectures: x86 s390 arm arm64 |
| 2267 | Type: vm ioctl | 2275 | Type: vm ioctl |
| 2268 | Parameters: struct kvm_irqfd (in) | 2276 | Parameters: struct kvm_irqfd (in) |
| 2269 | Returns: 0 on success, -1 on error | 2277 | Returns: 0 on success, -1 on error |
| @@ -2289,6 +2297,10 @@ Note that closing the resamplefd is not sufficient to disable the | |||
| 2289 | irqfd. The KVM_IRQFD_FLAG_RESAMPLE is only necessary on assignment | 2297 | irqfd. The KVM_IRQFD_FLAG_RESAMPLE is only necessary on assignment |
| 2290 | and need not be specified with KVM_IRQFD_FLAG_DEASSIGN. | 2298 | and need not be specified with KVM_IRQFD_FLAG_DEASSIGN. |
| 2291 | 2299 | ||
| 2300 | On ARM/ARM64, the gsi field in the kvm_irqfd struct specifies the Shared | ||
| 2301 | Peripheral Interrupt (SPI) index, such that the GIC interrupt ID is | ||
| 2302 | given by gsi + 32. | ||
| 2303 | |||
| 2292 | 4.76 KVM_PPC_ALLOCATE_HTAB | 2304 | 4.76 KVM_PPC_ALLOCATE_HTAB |
| 2293 | 2305 | ||
| 2294 | Capability: KVM_CAP_PPC_ALLOC_HTAB | 2306 | Capability: KVM_CAP_PPC_ALLOC_HTAB |
diff --git a/arch/arm/include/asm/kvm_arm.h b/arch/arm/include/asm/kvm_arm.h index 816db0bf2dd8..d995821f1698 100644 --- a/arch/arm/include/asm/kvm_arm.h +++ b/arch/arm/include/asm/kvm_arm.h | |||
| @@ -185,6 +185,7 @@ | |||
| 185 | #define HSR_COND (0xfU << HSR_COND_SHIFT) | 185 | #define HSR_COND (0xfU << HSR_COND_SHIFT) |
| 186 | 186 | ||
| 187 | #define FSC_FAULT (0x04) | 187 | #define FSC_FAULT (0x04) |
| 188 | #define FSC_ACCESS (0x08) | ||
| 188 | #define FSC_PERM (0x0c) | 189 | #define FSC_PERM (0x0c) |
| 189 | 190 | ||
| 190 | /* Hyp Prefetch Fault Address Register (HPFAR/HDFAR) */ | 191 | /* Hyp Prefetch Fault Address Register (HPFAR/HDFAR) */ |
diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h index 41008cd7c53f..d71607c16601 100644 --- a/arch/arm/include/asm/kvm_host.h +++ b/arch/arm/include/asm/kvm_host.h | |||
| @@ -27,6 +27,8 @@ | |||
| 27 | #include <asm/fpstate.h> | 27 | #include <asm/fpstate.h> |
| 28 | #include <kvm/arm_arch_timer.h> | 28 | #include <kvm/arm_arch_timer.h> |
| 29 | 29 | ||
| 30 | #define __KVM_HAVE_ARCH_INTC_INITIALIZED | ||
| 31 | |||
| 30 | #if defined(CONFIG_KVM_ARM_MAX_VCPUS) | 32 | #if defined(CONFIG_KVM_ARM_MAX_VCPUS) |
| 31 | #define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS | 33 | #define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS |
| 32 | #else | 34 | #else |
| @@ -165,19 +167,10 @@ void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte); | |||
| 165 | 167 | ||
