Commit:     a3863f68b0d7fe2073c0f4efe534ec87a685c4fa
Parent:     0c78441cf4dd66f66e23dc085f0cc1e3e8669b96
Author:     Glauber de Oliveira Costa <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 7 11:05:31 2008 -0200
Committer:  Rusty Russell <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 22:50:10 2008 +1100

    lguest: make emulate_insn receive a vcpu struct.
    emulate_insn() needs to know about current eip, which will be,
    in the future, a per-vcpu thing. So in this patch, the function
    prototype is modified to receive a vcpu struct
    Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]>
    Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
 drivers/lguest/x86/core.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/lguest/x86/core.c b/drivers/lguest/x86/core.c
index d35f629..ae46c6b 100644
--- a/drivers/lguest/x86/core.c
+++ b/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))
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to