Skip to content

Commit f44efa5

Browse files
committed
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.
2 parents a8750dd + acfb3b8 commit f44efa5

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

arch/arm64/kvm/handle_exit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run)
4545

4646
ret = kvm_psci_call(vcpu);
4747
if (ret < 0) {
48-
kvm_inject_undefined(vcpu);
48+
vcpu_set_reg(vcpu, 0, ~0UL);
4949
return 1;
5050
}
5151

@@ -54,7 +54,7 @@ static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run)
5454

5555
static int handle_smc(struct kvm_vcpu *vcpu, struct kvm_run *run)
5656
{
57-
kvm_inject_undefined(vcpu);
57+
vcpu_set_reg(vcpu, 0, ~0UL);
5858
return 1;
5959
}
6060

virt/kvm/arm/mmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
13101310
return -EFAULT;
13111311
}
13121312

1313-
if (is_vm_hugetlb_page(vma) && !logging_active) {
1313+
if (vma_kernel_pagesize(vma) == PMD_SIZE && !logging_active) {
13141314
hugetlb = true;
13151315
gfn = (fault_ipa & PMD_MASK) >> PAGE_SHIFT;
13161316
} else {

virt/kvm/arm/vgic/vgic-init.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,11 @@ int vgic_init(struct kvm *kvm)
285285
if (ret)
286286
goto out;
287287

288-
ret = vgic_v4_init(kvm);
289-
if (ret)
290-
goto out;
288+
if (vgic_has_its(kvm)) {
289+
ret = vgic_v4_init(kvm);
290+
if (ret)
291+
goto out;
292+
}
291293

292294
kvm_for_each_vcpu(i, vcpu, kvm)
293295
kvm_vgic_vcpu_enable(vcpu);

virt/kvm/arm/vgic/vgic-v4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ int vgic_v4_init(struct kvm *kvm)
118118
struct kvm_vcpu *vcpu;
119119
int i, nr_vcpus, ret;
120120

121-
if (!vgic_supports_direct_msis(kvm))
121+
if (!kvm_vgic_global_state.has_gicv4)
122122
return 0; /* Nothing to see here... move along. */
123123

124124
if (dist->its_vm.vpes)

0 commit comments

Comments
 (0)