From 50fd5b2945b095de0598b95c0e9e15047224452a Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Thu, 31 Mar 2011 18:48:09 +0200 Subject: [PATCH] --- yaml --- r: 248032 b: refs/heads/master c: 38503911b32186240301bbe81601cfabb37e752e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/kvm/emulate.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 651dc080ba93..d43aca02be6b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3ca3ac4dae5da5af375a9e80d2316ccfa7f0c6ab +refs/heads/master: 38503911b32186240301bbe81601cfabb37e752e diff --git a/trunk/arch/x86/kvm/emulate.c b/trunk/arch/x86/kvm/emulate.c index 8c38f6ca935b..c522b4e3dbb0 100644 --- a/trunk/arch/x86/kvm/emulate.c +++ b/trunk/arch/x86/kvm/emulate.c @@ -2477,6 +2477,15 @@ static int em_movdqu(struct x86_emulate_ctxt *ctxt) return X86EMUL_CONTINUE; } +static int em_invlpg(struct x86_emulate_ctxt *ctxt) +{ + struct decode_cache *c = &ctxt->decode; + emulate_invlpg(ctxt->vcpu, linear(ctxt, c->src.addr.mem)); + /* Disable writeback. */ + c->dst.type = OP_NONE; + return X86EMUL_CONTINUE; +} + static bool valid_cr(int nr) { switch (nr) { @@ -3966,10 +3975,7 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt) rc = X86EMUL_PROPAGATE_FAULT; goto done; case 7: /* invlpg*/ - emulate_invlpg(ctxt->vcpu, - linear(ctxt, c->src.addr.mem)); - /* Disable writeback. */ - c->dst.type = OP_NONE; + rc = em_invlpg(ctxt); break; default: goto cannot_emulate;