From 1f08c570c8c169bc32b1918d72f5b9d5cf84682a Mon Sep 17 00:00:00 2001 From: Glauber de Oliveira Costa Date: Mon, 7 Jan 2008 11:05:31 -0200 Subject: [PATCH] --- yaml --- r: 80911 b: refs/heads/master c: a3863f68b0d7fe2073c0f4efe534ec87a685c4fa h: refs/heads/master i: 80909: 8856fde2bbfebd97da3214e1c392eec33841459c 80907: a5d02cd723e93d641e1a9218ff3d51a2ecebc02e 80903: 7be0b986ec27346f37b14aee19e86d5357b3b125 80895: 8751fd40f4d79d8046c7f46ee45e73e7ebdffc67 v: v3 --- [refs] | 2 +- trunk/drivers/lguest/x86/core.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index e1d2220ab53e..e5c930c99372 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0c78441cf4dd66f66e23dc085f0cc1e3e8669b96 +refs/heads/master: a3863f68b0d7fe2073c0f4efe534ec87a685c4fa diff --git a/trunk/drivers/lguest/x86/core.c b/trunk/drivers/lguest/x86/core.c index d35f6299c92f..ae46c6b1f2f9 100644 --- a/trunk/drivers/lguest/x86/core.c +++ b/trunk/drivers/lguest/x86/core.c @@ -218,8 +218,9 @@ void lguest_arch_run_guest(struct lg_cpu *cpu) * When the Guest uses one of these instructions, we get a trap (General * Protection Fault) and come here. We see if it's one of those troublesome * instructions and skip over it. We return true if we did. */ -static int emulate_insn(struct lguest *lg) +static int emulate_insn(struct lg_cpu *cpu) { + struct lguest *lg = cpu->lg; u8 insn; unsigned int insnlen = 0, in = 0, shift = 0; /* The eip contains the *virtual* address of the Guest's instruction: @@ -292,7 +293,7 @@ void lguest_arch_handle_trap(struct lg_cpu *cpu) * instructions which we need to emulate. If so, we just go * back into the Guest after we've done it. */ if (lg->regs->errcode == 0) { - if (emulate_insn(lg)) + if (emulate_insn(cpu)) return; } break;