Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'signed-for-4.0' of git://github.com/agraf/linux-2.6

Patch queue for 4.0 - 2015-03-25

A few bug fixes for Book3S HV KVM:

- Fix spinlock ordering
- Fix idle guests on LE hosts
- Fix instruction emulation

authored by

Marcelo Tosatti and committed by
Marcelo Tosatti
27bfc6cf c875f421

+5 -4
+4 -4
arch/powerpc/kvm/book3s_hv.c
··· 636 636 spin_lock(&vcpu->arch.vpa_update_lock); 637 637 lppaca = (struct lppaca *)vcpu->arch.vpa.pinned_addr; 638 638 if (lppaca) 639 - yield_count = lppaca->yield_count; 639 + yield_count = be32_to_cpu(lppaca->yield_count); 640 640 spin_unlock(&vcpu->arch.vpa_update_lock); 641 641 return yield_count; 642 642 } ··· 942 942 static void kvmppc_set_lpcr(struct kvm_vcpu *vcpu, u64 new_lpcr, 943 943 bool preserve_top32) 944 944 { 945 + struct kvm *kvm = vcpu->kvm; 945 946 struct kvmppc_vcore *vc = vcpu->arch.vcore; 946 947 u64 mask; 947 948 949 + mutex_lock(&kvm->lock); 948 950 spin_lock(&vc->lock); 949 951 /* 950 952 * If ILE (interrupt little-endian) has changed, update the 951 953 * MSR_LE bit in the intr_msr for each vcpu in this vcore. 952 954 */ 953 955 if ((new_lpcr & LPCR_ILE) != (vc->lpcr & LPCR_ILE)) { 954 - struct kvm *kvm = vcpu->kvm; 955 956 struct kvm_vcpu *vcpu; 956 957 int i; 957 958 958 - mutex_lock(&kvm->lock); 959 959 kvm_for_each_vcpu(i, vcpu, kvm) { 960 960 if (vcpu->arch.vcore != vc) 961 961 continue; ··· 964 964 else 965 965 vcpu->arch.intr_msr &= ~MSR_LE; 966 966 } 967 - mutex_unlock(&kvm->lock); 968 967 } 969 968 970 969 /* ··· 980 981 mask &= 0xFFFFFFFF; 981 982 vc->lpcr = (vc->lpcr & ~mask) | (new_lpcr & mask); 982 983 spin_unlock(&vc->lock); 984 + mutex_unlock(&kvm->lock); 983 985 } 984 986 985 987 static int kvmppc_get_one_reg_hv(struct kvm_vcpu *vcpu, u64 id,
+1
arch/powerpc/kvm/book3s_hv_rmhandlers.S
··· 1005 1005 /* Save HEIR (HV emulation assist reg) in emul_inst 1006 1006 if this is an HEI (HV emulation interrupt, e40) */ 1007 1007 li r3,KVM_INST_FETCH_FAILED 1008 + stw r3,VCPU_LAST_INST(r9) 1008 1009 cmpwi r12,BOOK3S_INTERRUPT_H_EMUL_ASSIST 1009 1010 bne 11f 1010 1011 mfspr r3,SPRN_HEIR