]> err.no Git - linux-2.6/commitdiff
lguest: change last_guest to last_cpu
authorGlauber de Oliveira Costa <gcosta@redhat.com>
Thu, 17 Jan 2008 21:11:20 +0000 (19:11 -0200)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 30 Jan 2008 11:50:15 +0000 (22:50 +1100)
in our model, a guest does not run in a cpu anymore: a virtual cpu
does. So we change last_guest to last_cpu

Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/lguest/x86/core.c

index 8c723555ffb39cf396ddf19272ae909e83fce08c..10eab6748d84ef202c80ba836bbbf54d1eecbae3 100644 (file)
@@ -60,7 +60,7 @@ static struct lguest_pages *lguest_pages(unsigned int cpu)
                  (SWITCHER_ADDR + SHARED_SWITCHER_PAGES*PAGE_SIZE))[cpu]);
 }
 
-static DEFINE_PER_CPU(struct lguest *, last_guest);
+static DEFINE_PER_CPU(struct lg_cpu *, last_cpu);
 
 /*S:010
  * We approach the Switcher.
@@ -80,8 +80,8 @@ static void copy_in_guest_info(struct lg_cpu *cpu, struct lguest_pages *pages)
         * same Guest we ran last time (and that Guest hasn't run anywhere else
         * meanwhile).  If that's not the case, we pretend everything in the
         * Guest has changed. */
-       if (__get_cpu_var(last_guest) != lg || lg->last_pages != pages) {
-               __get_cpu_var(last_guest) = lg;
+       if (__get_cpu_var(last_cpu) != cpu || lg->last_pages != pages) {
+               __get_cpu_var(last_cpu) = cpu;
                lg->last_pages = pages;
                lg->changed = CHANGED_ALL;
        }