On 05/09/2013 11:40:08 PM, tiejun.chen wrote:
On 05/10/2013 11:34 AM, Bhushan Bharat-R65777 wrote:
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 705fc5c..eb89b83 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -673,7 +673,7 @@ int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu
*vcpu)
                ret = s;
                goto out;
        }
-       kvmppc_lazy_ee_enable();
+       kvmppc_fix_ee_before_entry();

local_irq_disable() is called before kvmppc_prepare_to_enter().

In patch 4, we call hard_irq_disable() once enter kvmppc_prepare_to_enter().

And before patch 4, we have the code near the end of kvmppc_prepare_to_enter() that checks lazy_irq_pending() and aborts guest entry if there was a race. If I'd known about that bit of code beforehand, I probably wouldn't have bothered with most of patch 4/4, but now that it's been done it seems cleaner.

-Scott
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to