Skip to content

Commit

Permalink
Merge tag 'kvm-arm-fixes-for-v4.15-3-v2' of git://git.kernel.org/pub/…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
rkrcmar committed Jan 17, 2018
2 parents a8750dd + acfb3b8 commit f44efa5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions arch/arm64/kvm/handle_exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run)

ret = kvm_psci_call(vcpu);
if (ret < 0) {
kvm_inject_undefined(vcpu);
vcpu_set_reg(vcpu, 0, ~0UL);
return 1;
}

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

static int handle_smc(struct kvm_vcpu *vcpu, struct kvm_run *run)
{
kvm_inject_undefined(vcpu);
vcpu_set_reg(vcpu, 0, ~0UL);
return 1;
}

Expand Down
2 changes: 1 addition & 1 deletion virt/kvm/arm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
return -EFAULT;
}

if (is_vm_hugetlb_page(vma) && !logging_active) {
if (vma_kernel_pagesize(vma) == PMD_SIZE && !logging_active) {
hugetlb = true;
gfn = (fault_ipa & PMD_MASK) >> PAGE_SHIFT;
} else {
Expand Down
8 changes: 5 additions & 3 deletions virt/kvm/arm/vgic/vgic-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,11 @@ int vgic_init(struct kvm *kvm)
if (ret)
goto out;

ret = vgic_v4_init(kvm);
if (ret)
goto out;
if (vgic_has_its(kvm)) {
ret = vgic_v4_init(kvm);
if (ret)
goto out;
}

kvm_for_each_vcpu(i, vcpu, kvm)
kvm_vgic_vcpu_enable(vcpu);
Expand Down
2 changes: 1 addition & 1 deletion virt/kvm/arm/vgic/vgic-v4.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ int vgic_v4_init(struct kvm *kvm)
struct kvm_vcpu *vcpu;
int i, nr_vcpus, ret;

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

if (dist->its_vm.vpes)
Expand Down

0 comments on commit f44efa5

Please sign in to comment.