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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQIcBAABAgAGBQJVEy9HAAoJECszeR4D/txgPxEQAKMglNb5wHkm0QaQrXZ0sYs0 w/N6QUM/UWG4x6kFb1JUBwt+Piboxriial9xVUdYwnIZbvWfN6X6+HEs599R4dHm m9at/dvOo4/Zd5TRVlV3CJUIkiWtFYAgmBU8oy03bbyiPyT+qk8RPwusH1iTy+iW 1ul9cuKCZ1EL3zIDe0pkVsF8Z7cB2QO/1ACbuM1LQdn74FoZen9VoKepDV+jG01n Dw8zwbdCmCb4aMtYCu42jjvcNlf3qNNNzm31vDXl085lXOOdwVSppUhMIlciNrxK MuJ0NhT7zLL2BSLBD9R7Zaiify0Zl/x8ja2g+FIKQRufVFKZkcSBXpUV7uFuJMNA BdIZkpKAwLNcUpmOG1eJ1xRbSzhDa3DazbInV2BBaySUgG1cDtWOCVa6rFHA4f5X Kgcug1aeB62jgvx69JjM3EOnjwvEzTwMMeCELAsjXgRIUKZj6ietJ8Zz3StrDNRj HRsu/yvS/56qOXA4vcMXcqx0Ziztpwv0Ttrk9aqOkwfkTdg5+sFrMqFWbIA+opzX Zuw0HF+CpbLzdCqiIalA56WhVfExZq4uApzfKhdPFu2lAznILYbMq+1M+8F6KjXe hkUCdXE9J/C2bnrRLR5NlKa/IPJTQcqWttLtphO3+jeZzevN26t268xxO/5IZuZ6 QUhZ6XGXgbabxYqLIepw =fAF8 -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
27bfc6cfda
2 changed files with 5 additions and 4 deletions
|
@ -636,7 +636,7 @@ static int kvmppc_get_yield_count(struct kvm_vcpu *vcpu)
|
|||
spin_lock(&vcpu->arch.vpa_update_lock);
|
||||
lppaca = (struct lppaca *)vcpu->arch.vpa.pinned_addr;
|
||||
if (lppaca)
|
||||
yield_count = lppaca->yield_count;
|
||||
yield_count = be32_to_cpu(lppaca->yield_count);
|
||||
spin_unlock(&vcpu->arch.vpa_update_lock);
|
||||
return yield_count;
|
||||
}
|
||||
|
@ -942,20 +942,20 @@ static int kvm_arch_vcpu_ioctl_set_sregs_hv(struct kvm_vcpu *vcpu,
|
|||
static void kvmppc_set_lpcr(struct kvm_vcpu *vcpu, u64 new_lpcr,
|
||||
bool preserve_top32)
|
||||
{
|
||||
struct kvm *kvm = vcpu->kvm;
|
||||
struct kvmppc_vcore *vc = vcpu->arch.vcore;
|
||||
u64 mask;
|
||||
|
||||
mutex_lock(&kvm->lock);
|
||||
spin_lock(&vc->lock);
|
||||
/*
|
||||
* If ILE (interrupt little-endian) has changed, update the
|
||||
* MSR_LE bit in the intr_msr for each vcpu in this vcore.
|
||||
*/
|
||||
if ((new_lpcr & LPCR_ILE) != (vc->lpcr & LPCR_ILE)) {
|
||||
struct kvm *kvm = vcpu->kvm;
|
||||
struct kvm_vcpu *vcpu;
|
||||
int i;
|
||||
|
||||
mutex_lock(&kvm->lock);
|
||||
kvm_for_each_vcpu(i, vcpu, kvm) {
|
||||
if (vcpu->arch.vcore != vc)
|
||||
continue;
|
||||
|
@ -964,7 +964,6 @@ static void kvmppc_set_lpcr(struct kvm_vcpu *vcpu, u64 new_lpcr,
|
|||
else
|
||||
vcpu->arch.intr_msr &= ~MSR_LE;
|
||||
}
|
||||
mutex_unlock(&kvm->lock);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -981,6 +980,7 @@ static void kvmppc_set_lpcr(struct kvm_vcpu *vcpu, u64 new_lpcr,
|
|||
mask &= 0xFFFFFFFF;
|
||||
vc->lpcr = (vc->lpcr & ~mask) | (new_lpcr & mask);
|
||||
spin_unlock(&vc->lock);
|
||||
mutex_unlock(&kvm->lock);
|
||||
}
|
||||
|
||||
static int kvmppc_get_one_reg_hv(struct kvm_vcpu *vcpu, u64 id,
|
||||
|
|
|
@ -1005,6 +1005,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
|
|||
/* Save HEIR (HV emulation assist reg) in emul_inst
|
||||
if this is an HEI (HV emulation interrupt, e40) */
|
||||
li r3,KVM_INST_FETCH_FAILED
|
||||
stw r3,VCPU_LAST_INST(r9)
|
||||
cmpwi r12,BOOK3S_INTERRUPT_H_EMUL_ASSIST
|
||||
bne 11f
|
||||
mfspr r3,SPRN_HEIR
|
||||
|
|
Loading…
Reference in a new issue