diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-14 16:54:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-14 16:54:30 -0500 |
commit | 48c53db22032841290113799d43b24a677a4b24a (patch) | |
tree | 2a73075e8135f8165d5e9a5fd9471e2c26679779 | |
parent | 6fb400d36de0926309c8059ad81b0091593c2931 (diff) | |
parent | 801f6772cecea6cfc7da61aa197716ab64db5f9e (diff) |
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm fixes from Paolo Bonzini:
"Two bugfixes for arm64. I will have another pull request next week,
but otherwise things are calm"
* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
arm64: KVM: Fix HCR setting for 32bit guests
arm64: KVM: Fix TLB invalidation by IPA/VMID
-rw-r--r-- | arch/arm64/include/asm/kvm_emulate.h | 2 | ||||
-rw-r--r-- | arch/arm64/kvm/hyp.S | 1 | ||||
-rw-r--r-- | arch/arm64/kvm/reset.c | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/kvm_emulate.h b/arch/arm64/include/asm/kvm_emulate.h index 8127e45e2637..865a7e28ea2d 100644 --- a/arch/arm64/include/asm/kvm_emulate.h +++ b/arch/arm64/include/asm/kvm_emulate.h | |||
@@ -41,6 +41,8 @@ void kvm_inject_pabt(struct kvm_vcpu *vcpu, unsigned long addr); | |||
41 | static inline void vcpu_reset_hcr(struct kvm_vcpu *vcpu) | 41 | static inline void vcpu_reset_hcr(struct kvm_vcpu *vcpu) |
42 | { | 42 | { |
43 | vcpu->arch.hcr_el2 = HCR_GUEST_FLAGS; | 43 | vcpu->arch.hcr_el2 = HCR_GUEST_FLAGS; |
44 | if (test_bit(KVM_ARM_VCPU_EL1_32BIT, vcpu->arch.features)) | ||
45 | vcpu->arch.hcr_el2 &= ~HCR_RW; | ||
44 | } | 46 | } |
45 | 47 | ||
46 | static inline unsigned long *vcpu_pc(const struct kvm_vcpu *vcpu) | 48 | static inline unsigned long *vcpu_pc(const struct kvm_vcpu *vcpu) |
diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S index fbe909fb0a1a..c3ca89c27c6b 100644 --- a/arch/arm64/kvm/hyp.S +++ b/arch/arm64/kvm/hyp.S | |||
@@ -1014,6 +1014,7 @@ ENTRY(__kvm_tlb_flush_vmid_ipa) | |||
1014 | * Instead, we invalidate Stage-2 for this IPA, and the | 1014 | * Instead, we invalidate Stage-2 for this IPA, and the |
1015 | * whole of Stage-1. Weep... | 1015 | * whole of Stage-1. Weep... |
1016 | */ | 1016 | */ |
1017 | lsr x1, x1, #12 | ||
1017 | tlbi ipas2e1is, x1 | 1018 | tlbi ipas2e1is, x1 |
1018 | /* | 1019 | /* |
1019 | * We have to ensure completion of the invalidation at Stage-2, | 1020 | * We have to ensure completion of the invalidation at Stage-2, |
diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c index 70a7816535cd..0b4326578985 100644 --- a/arch/arm64/kvm/reset.c +++ b/arch/arm64/kvm/reset.c | |||
@@ -90,7 +90,6 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu) | |||
90 | if (!cpu_has_32bit_el1()) | 90 | if (!cpu_has_32bit_el1()) |
91 | return -EINVAL; | 91 | return -EINVAL; |
92 | cpu_reset = &default_regs_reset32; | 92 | cpu_reset = &default_regs_reset32; |
93 | vcpu->arch.hcr_el2 &= ~HCR_RW; | ||
94 | } else { | 93 | } else { |
95 | cpu_reset = &default_regs_reset; | 94 | cpu_reset = &default_regs_reset; |
96 | } | 95 | } |