Skip to content

Commit 5af16d4

Browse files
committed
Merge branch 'topic/ppc-kvm' into next
2 parents 01d34cc + 46765aa commit 5af16d4

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

arch/powerpc/kvm/book3s_hv.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1922,14 +1922,22 @@ static int kvmppc_handle_exit_hv(struct kvm_vcpu *vcpu,
19221922

19231923
r = EMULATE_FAIL;
19241924
if (cpu_has_feature(CPU_FTR_ARCH_300)) {
1925-
if (cause == FSCR_MSGP_LG)
1925+
switch (cause) {
1926+
case FSCR_MSGP_LG:
19261927
r = kvmppc_emulate_doorbell_instr(vcpu);
1927-
if (cause == FSCR_PM_LG)
1928+
break;
1929+
case FSCR_PM_LG:
19281930
r = kvmppc_pmu_unavailable(vcpu);
1929-
if (cause == FSCR_EBB_LG)
1931+
break;
1932+
case FSCR_EBB_LG:
19301933
r = kvmppc_ebb_unavailable(vcpu);
1931-
if (cause == FSCR_TM_LG)
1934+
break;
1935+
case FSCR_TM_LG:
19321936
r = kvmppc_tm_unavailable(vcpu);
1937+
break;
1938+
default:
1939+
break;
1940+
}
19331941
}
19341942
if (r == EMULATE_FAIL) {
19351943
kvmppc_core_queue_program(vcpu, SRR1_PROGILL |
@@ -4049,7 +4057,6 @@ static noinline void kvmppc_run_core(struct kvmppc_vcore *vc)
40494057
/* Return to whole-core mode if we split the core earlier */
40504058
if (cmd_bit) {
40514059
unsigned long hid0 = mfspr(SPRN_HID0);
4052-
unsigned long loops = 0;
40534060

40544061
hid0 &= ~HID0_POWER8_DYNLPARDIS;
40554062
stat_bit = HID0_POWER8_2LPARMODE | HID0_POWER8_4LPARMODE;
@@ -4061,7 +4068,6 @@ static noinline void kvmppc_run_core(struct kvmppc_vcore *vc)
40614068
if (!(hid0 & stat_bit))
40624069
break;
40634070
cpu_relax();
4064-
++loops;
40654071
}
40664072
split_info.do_nap = 0;
40674073
}

0 commit comments

Comments
 (0)