diff options
author | Radim Krčmář <rkrcmar@redhat.com> | 2018-01-17 08:59:27 -0500 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2018-01-17 08:59:27 -0500 |
commit | f44efa5aeaadb0091f90d6888161a0dcb84fa441 (patch) | |
tree | 195820159823299b700c202feb61988b65e26096 | |
parent | a8750ddca918032d6349adbf9a4b6555e7db20da (diff) | |
parent | acfb3b883f6d6a4b5d27ad7fdded11f6a09ae6dd (diff) |
Merge tag 'kvm-arm-fixes-for-v4.15-3-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm
KVM/ARM Fixes for v4.15, Round 3 (v2)
Three more fixes for v4.15 fixing incorrect huge page mappings on systems using
the contigious hint for hugetlbfs; supporting an alternative GICv4 init
sequence; and correctly implementing the ARM SMCC for HVC and SMC handling.
-rw-r--r-- | arch/arm64/kvm/handle_exit.c | 4 | ||||
-rw-r--r-- | virt/kvm/arm/mmu.c | 2 | ||||
-rw-r--r-- | virt/kvm/arm/vgic/vgic-init.c | 8 | ||||
-rw-r--r-- | virt/kvm/arm/vgic/vgic-v4.c | 2 |
4 files changed, 9 insertions, 7 deletions
diff --git a/arch/arm64/kvm/handle_exit.c b/arch/arm64/kvm/handle_exit.c index 304203fa9e33..e60494f1eef9 100644 --- a/arch/arm64/kvm/handle_exit.c +++ b/arch/arm64/kvm/handle_exit.c | |||
@@ -45,7 +45,7 @@ static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
45 | 45 | ||
46 | ret = kvm_psci_call(vcpu); | 46 | ret = kvm_psci_call(vcpu); |
47 | if (ret < 0) { | 47 | if (ret < 0) { |
48 | kvm_inject_undefined(vcpu); | 48 | vcpu_set_reg(vcpu, 0, ~0UL); |
49 | return 1; | 49 | return 1; |
50 | } | 50 | } |
51 | 51 | ||
@@ -54,7 +54,7 @@ static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
54 | 54 | ||
55 | static int handle_smc(struct kvm_vcpu *vcpu, struct kvm_run *run) | 55 | static int handle_smc(struct kvm_vcpu *vcpu, struct kvm_run *run) |
56 | { | 56 | { |
57 | kvm_inject_undefined(vcpu); | 57 | vcpu_set_reg(vcpu, 0, ~0UL); |
58 | return 1; | 58 | return 1; |
59 | } | 59 | } |
60 | 60 | ||
diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c index b4b69c2d1012..9dea96380339 100644 --- a/virt/kvm/arm/mmu.c +++ b/virt/kvm/arm/mmu.c | |||
@@ -1310,7 +1310,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, | |||
1310 | return -EFAULT; | 1310 | return -EFAULT; |
1311 | } | 1311 | } |
1312 | 1312 | ||
1313 | if (is_vm_hugetlb_page(vma) && !logging_active) { | 1313 | if (vma_kernel_pagesize(vma) == PMD_SIZE && !logging_active) { |
1314 | hugetlb = true; | 1314 | hugetlb = true; |
1315 | gfn = (fault_ipa & PMD_MASK) >> PAGE_SHIFT; | 1315 | gfn = (fault_ipa & PMD_MASK) >> PAGE_SHIFT; |
1316 | } else { | 1316 | } else { |
diff --git a/virt/kvm/arm/vgic/vgic-init.c b/virt/kvm/arm/vgic/vgic-init.c index 62310122ee78..743ca5cb05ef 100644 --- a/virt/kvm/arm/vgic/vgic-init.c +++ b/virt/kvm/arm/vgic/vgic-init.c | |||
@@ -285,9 +285,11 @@ int vgic_init(struct kvm *kvm) | |||
285 | if (ret) | 285 | if (ret) |
286 | goto out; | 286 | goto out; |
287 | 287 | ||
288 | ret = vgic_v4_init(kvm); | 288 | if (vgic_has_its(kvm)) { |
289 | if (ret) | 289 | ret = vgic_v4_init(kvm); |
290 | goto out; | 290 | if (ret) |
291 | goto out; | ||
292 | } | ||
291 | 293 | ||
292 | kvm_for_each_vcpu(i, vcpu, kvm) | 294 | kvm_for_each_vcpu(i, vcpu, kvm) |
293 | kvm_vgic_vcpu_enable(vcpu); | 295 | kvm_vgic_vcpu_enable(vcpu); |
diff --git a/virt/kvm/arm/vgic/vgic-v4.c b/virt/kvm/arm/vgic/vgic-v4.c index 4a37292855bc..bc4265154bac 100644 --- a/virt/kvm/arm/vgic/vgic-v4.c +++ b/virt/kvm/arm/vgic/vgic-v4.c | |||
@@ -118,7 +118,7 @@ int vgic_v4_init(struct kvm *kvm) | |||
118 | struct kvm_vcpu *vcpu; | 118 | struct kvm_vcpu *vcpu; |
119 | int i, nr_vcpus, ret; | 119 | int i, nr_vcpus, ret; |
120 | 120 | ||
121 | if (!vgic_supports_direct_msis(kvm)) | 121 | if (!kvm_vgic_global_state.has_gicv4) |
122 | return 0; /* Nothing to see here... move along. */ | 122 | return 0; /* Nothing to see here... move along. */ |
123 | 123 | ||
124 | if (dist->its_vm.vpes) | 124 | if (dist->its_vm.vpes) |