diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2014-08-29 06:26:54 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-08-29 06:26:54 -0400 |
commit | 8d68f67b57825b4287b599df1544a4df5bbdcccb (patch) | |
tree | 88029cd6d94b5b2cdeb9a3ab2f8e4ec13fc20de9 /arch | |
parent | 0ac625df43ce9d085d4ff54c1f739611f4308b13 (diff) | |
parent | 05e0127f9e362b36aa35f17b1a3d52bca9322a3a (diff) |
Merge tag 'kvm-arm-for-v3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
These fixes fix two issues in KVM for arm/arm64:
- hyp mode initialization issues on certian boards/bootloader combos.
- incorrect return address from trapped WFI/WFE instrucitons, which
breaks non-linux guests.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kvm/handle_exit.c | 2 | ||||
-rw-r--r-- | arch/arm/kvm/init.S | 4 | ||||
-rw-r--r-- | arch/arm64/kvm/handle_exit.c | 2 | ||||
-rw-r--r-- | arch/arm64/kvm/hyp-init.S | 4 |
4 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/kvm/handle_exit.c b/arch/arm/kvm/handle_exit.c index 4c979d466cc1..a96a8043277c 100644 --- a/arch/arm/kvm/handle_exit.c +++ b/arch/arm/kvm/handle_exit.c | |||
@@ -93,6 +93,8 @@ static int kvm_handle_wfx(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
93 | else | 93 | else |
94 | kvm_vcpu_block(vcpu); | 94 | kvm_vcpu_block(vcpu); |
95 | 95 | ||
96 | kvm_skip_instr(vcpu, kvm_vcpu_trap_il_is32bit(vcpu)); | ||
97 | |||
96 | return 1; | 98 | return 1; |
97 | } | 99 | } |
98 | 100 | ||
diff --git a/arch/arm/kvm/init.S b/arch/arm/kvm/init.S index 991415d978b6..3988e72d16ff 100644 --- a/arch/arm/kvm/init.S +++ b/arch/arm/kvm/init.S | |||
@@ -99,6 +99,10 @@ __do_hyp_init: | |||
99 | mrc p15, 0, r0, c10, c2, 1 | 99 | mrc p15, 0, r0, c10, c2, 1 |
100 | mcr p15, 4, r0, c10, c2, 1 | 100 | mcr p15, 4, r0, c10, c2, 1 |
101 | 101 | ||
102 | @ Invalidate the stale TLBs from Bootloader | ||
103 | mcr p15, 4, r0, c8, c7, 0 @ TLBIALLH | ||
104 | dsb ish | ||
105 | |||
102 | @ Set the HSCTLR to: | 106 | @ Set the HSCTLR to: |
103 | @ - ARM/THUMB exceptions: Kernel config (Thumb-2 kernel) | 107 | @ - ARM/THUMB exceptions: Kernel config (Thumb-2 kernel) |
104 | @ - Endianness: Kernel config | 108 | @ - Endianness: Kernel config |
diff --git a/arch/arm64/kvm/handle_exit.c b/arch/arm64/kvm/handle_exit.c index e28be510380c..34b8bd0711e9 100644 --- a/arch/arm64/kvm/handle_exit.c +++ b/arch/arm64/kvm/handle_exit.c | |||
@@ -66,6 +66,8 @@ static int kvm_handle_wfx(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
66 | else | 66 | else |
67 | kvm_vcpu_block(vcpu); | 67 | kvm_vcpu_block(vcpu); |
68 | 68 | ||
69 | kvm_skip_instr(vcpu, kvm_vcpu_trap_il_is32bit(vcpu)); | ||
70 | |||
69 | return 1; | 71 | return 1; |
70 | } | 72 | } |
71 | 73 | ||
diff --git a/arch/arm64/kvm/hyp-init.S b/arch/arm64/kvm/hyp-init.S index d968796f4b2d..c3191168a994 100644 --- a/arch/arm64/kvm/hyp-init.S +++ b/arch/arm64/kvm/hyp-init.S | |||
@@ -80,6 +80,10 @@ __do_hyp_init: | |||
80 | msr mair_el2, x4 | 80 | msr mair_el2, x4 |
81 | isb | 81 | isb |
82 | 82 | ||
83 | /* Invalidate the stale TLBs from Bootloader */ | ||
84 | tlbi alle2 | ||
85 | dsb sy | ||
86 | |||
83 | mrs x4, sctlr_el2 | 87 | mrs x4, sctlr_el2 |
84 | and x4, x4, #SCTLR_EL2_EE // preserve endianness of EL2 | 88 | and x4, x4, #SCTLR_EL2_EE // preserve endianness of EL2 |
85 | ldr x5, =SCTLR_EL2_FLAGS | 89 | ldr x5, =SCTLR_EL2_FLAGS |