Re: [RFC PATCH 14/16] KVM: PPC: booke: category E.HV (GS-mode) support
From: Alexander Graf <hidden>
Date: 2012-01-12 07:11:03
Also in:
kvm
On 12.01.2012, at 07:44, Benjamin Herrenschmidt [off-list ref] w= rote:
On Tue, 2012-01-10 at 04:11 +0100, Alexander Graf wrote:quoted
This is what book3s does: =20 case EMULATE_FAIL: printk(KERN_CRIT "%s: emulation at %lx failed (%08x)\n", __func__, kvmppc_get_pc(vcpu), kvmppc_get_last_inst(vcpu)); kvmppc_core_queue_program(vcpu, flags); r =3D RESUME_GUEST; =20 which also doesn't throttle the printk, but I think injecting a program fault into the guest is the most sensible thing to do if we don't know what the instruction is supposed to do. Best case we get an oops inside the guest telling us what broke :).=20 You can also fallback to a slow path that reads the guest TLB, translates then reads the instruction. Of course you have to be careful as such a manual translate + read + execute needs to be somewhat synchronized with a possible TLB invalidation :-)
Well we do want to be fast on the default path though. So yes, what you're s= aying is what book3s does, but as a fallback in case the fast path didn't wo= rk. The problem here however is that we don't know if the fast path failed; we o= ops.
=20 (MMIO emulation is broken in this regard too btw)
Huh? Alex
=20 Cheers, Ben. =20 =20