From 6efed4348b8fdcac1f5099e0b07ad1747fc70202 Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Sun, 12 Apr 2009 13:36:57 +0300 Subject: [PATCH] --- yaml --- r: 146543 b: refs/heads/master c: ba8afb6b0a2c7e06da760ffe5d078245058619b5 h: refs/heads/master i: 146541: 201a232e4d0a8fab148f29fcad50c2e729fe34ca 146539: 6cc689bda94b812fa42233a40ba9dea281c7b9ef 146535: b0a622f3f4c2f88778e82fd10eeb45dd56cfb805 146527: 8572f85d9d992b0a62076d0fc0563f61b143a372 v: v3 --- [refs] | 2 +- trunk/arch/x86/include/asm/kvm_host.h | 1 + trunk/arch/x86/kvm/x86.c | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 47aafc3bc776..284be825d151 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e637b8238ad1783ebdd113bd34cd6982dec1006d +refs/heads/master: ba8afb6b0a2c7e06da760ffe5d078245058619b5 diff --git a/trunk/arch/x86/include/asm/kvm_host.h b/trunk/arch/x86/include/asm/kvm_host.h index 0e3a7c6e522c..cb306cff2b49 100644 --- a/trunk/arch/x86/include/asm/kvm_host.h +++ b/trunk/arch/x86/include/asm/kvm_host.h @@ -562,6 +562,7 @@ enum emulation_result { #define EMULTYPE_NO_DECODE (1 << 0) #define EMULTYPE_TRAP_UD (1 << 1) +#define EMULTYPE_SKIP (1 << 2) int emulate_instruction(struct kvm_vcpu *vcpu, struct kvm_run *run, unsigned long cr2, u16 error_code, int emulation_type); void kvm_report_emulation_failure(struct kvm_vcpu *cvpu, const char *context); diff --git a/trunk/arch/x86/kvm/x86.c b/trunk/arch/x86/kvm/x86.c index b5ac1b722454..8beccaa17690 100644 --- a/trunk/arch/x86/kvm/x86.c +++ b/trunk/arch/x86/kvm/x86.c @@ -2413,6 +2413,11 @@ int emulate_instruction(struct kvm_vcpu *vcpu, } } + if (emulation_type & EMULTYPE_SKIP) { + kvm_rip_write(vcpu, vcpu->arch.emulate_ctxt.decode.eip); + return EMULATE_DONE; + } + r = x86_emulate_insn(&vcpu->arch.emulate_ctxt, &emulate_ops); if (vcpu->arch.pio.string)