|
|
@@ -2550,7 +2550,7 @@ static void collect_piggybacks(struct core_info *cip, int target_threads)
|
|
|
if (!spin_trylock(&pvc->lock))
|
|
|
continue;
|
|
|
prepare_threads(pvc);
|
|
|
- if (!pvc->n_runnable) {
|
|
|
+ if (!pvc->n_runnable || !pvc->kvm->arch.mmu_ready) {
|
|
|
list_del_init(&pvc->preempt_list);
|
|
|
if (pvc->runner == NULL) {
|
|
|
pvc->vcore_state = VCORE_INACTIVE;
|
|
|
@@ -2571,15 +2571,20 @@ static void collect_piggybacks(struct core_info *cip, int target_threads)
|
|
|
spin_unlock(&lp->lock);
|
|
|
}
|
|
|
|
|
|
-static bool recheck_signals(struct core_info *cip)
|
|
|
+static bool recheck_signals_and_mmu(struct core_info *cip)
|
|
|
{
|
|
|
int sub, i;
|
|
|
struct kvm_vcpu *vcpu;
|
|
|
+ struct kvmppc_vcore *vc;
|
|
|
|
|
|
- for (sub = 0; sub < cip->n_subcores; ++sub)
|
|
|
- for_each_runnable_thread(i, vcpu, cip->vc[sub])
|
|
|
+ for (sub = 0; sub < cip->n_subcores; ++sub) {
|
|
|
+ vc = cip->vc[sub];
|
|
|
+ if (!vc->kvm->arch.mmu_ready)
|
|
|
+ return true;
|
|
|
+ for_each_runnable_thread(i, vcpu, vc)
|
|
|
if (signal_pending(vcpu->arch.run_task))
|
|
|
return true;
|
|
|
+ }
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -2800,7 +2805,7 @@ static noinline void kvmppc_run_core(struct kvmppc_vcore *vc)
|
|
|
local_irq_disable();
|
|
|
hard_irq_disable();
|
|
|
if (lazy_irq_pending() || need_resched() ||
|
|
|
- recheck_signals(&core_info) || !vc->kvm->arch.mmu_ready) {
|
|
|
+ recheck_signals_and_mmu(&core_info)) {
|
|
|
local_irq_enable();
|
|
|
vc->vcore_state = VCORE_INACTIVE;
|
|
|
/* Unlock all except the primary vcore */
|