From: Alexander Graf Date: Thu, 15 Apr 2010 22:11:50 +0000 Subject: [PATCH 19/27] KVM: PPC: Remove fetch fail code Message-Id: <1271369518-11247-20-git-send-email-agraf@suse.de> List-Id: References: <1271369518-11247-1-git-send-email-agraf@suse.de> In-Reply-To: <1271369518-11247-1-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org Cc: kvm@vger.kernel.org When instruction fetch failed, the inline function hook automatically detects that and starts the internal guest memory load function. So whenever we access kvmppc_get_last_inst(), we're sure the result is sane. Signed-off-by: Alexander Graf --- arch/powerpc/kvm/emulate.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index b608c0b..4568ec3 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c @@ -147,10 +147,6 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu) pr_debug(KERN_INFO "Emulating opcode %d / %d\n", get_op(inst), get_xop(inst)); - /* Try again next time */ - if (inst = KVM_INST_FETCH_FAILED) - return EMULATE_DONE; - switch (get_op(inst)) { case OP_TRAP: #ifdef CONFIG_PPC_BOOK3S -- 1.6.0.2