提交 c40a9f47 编写于 作者: G Glauber de Oliveira Costa 提交者: Rusty Russell

lguest: change last_guest to last_cpu

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: NGlauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
上级 2092aa27
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册