aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest/interrupts_and_traps.c
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-01-07 08:05:37 -0500
committerRusty Russell <rusty@rustcorp.com.au>2008-01-30 06:50:14 -0500
commit1713608f280002d9ffc6de89d7de5cf367072d63 (patch)
tree332e7bdbe7ccccad408b309a4dd00b706b04082f /drivers/lguest/interrupts_and_traps.c
parent5e232f4f428c4266ba5cdae9f23ba19a0913dcf9 (diff)
lguest: per-vcpu lguest pgdir management
this patch makes the pgdir management per-vcpu. The pgdirs pool is still guest-wide (although it'll probably need to grow when we are really executing more vcpus), but the pgdidx index is gone, since it makes no sense anymore. Instead, we use a per-vcpu index. Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest/interrupts_and_traps.c')
-rw-r--r--drivers/lguest/interrupts_and_traps.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/lguest/interrupts_and_traps.c b/drivers/lguest/interrupts_and_traps.c
index b87d9d6c36a4..6bbfce4e5987 100644
--- a/drivers/lguest/interrupts_and_traps.c
+++ b/drivers/lguest/interrupts_and_traps.c
@@ -76,7 +76,7 @@ static void set_guest_interrupt(struct lg_cpu *cpu, u32 lo, u32 hi, int has_err)
76 virtstack = cpu->esp1; 76 virtstack = cpu->esp1;
77 ss = cpu->ss1; 77 ss = cpu->ss1;
78 78
79 origstack = gstack = guest_pa(lg, virtstack); 79 origstack = gstack = guest_pa(cpu, virtstack);
80 /* We push the old stack segment and pointer onto the new 80 /* We push the old stack segment and pointer onto the new
81 * stack: when the Guest does an "iret" back from the interrupt 81 * stack: when the Guest does an "iret" back from the interrupt
82 * handler the CPU will notice they're dropping privilege 82 * handler the CPU will notice they're dropping privilege
@@ -88,7 +88,7 @@ static void set_guest_interrupt(struct lg_cpu *cpu, u32 lo, u32 hi, int has_err)
88 virtstack = cpu->regs->esp; 88 virtstack = cpu->regs->esp;
89 ss = cpu->regs->ss; 89 ss = cpu->regs->ss;
90 90
91 origstack = gstack = guest_pa(lg, virtstack); 91 origstack = gstack = guest_pa(cpu, virtstack);
92 } 92 }
93 93
94 /* Remember that we never let the Guest actually disable interrupts, so 94 /* Remember that we never let the Guest actually disable interrupts, so
@@ -323,7 +323,7 @@ void pin_stack_pages(struct lg_cpu *cpu)
323 * start of the page after the kernel stack. Subtract one to 323 * start of the page after the kernel stack. Subtract one to
324 * get back onto the first stack page, and keep subtracting to 324 * get back onto the first stack page, and keep subtracting to
325 * get to the rest of the stack pages. */ 325 * get to the rest of the stack pages. */
326 pin_page(lg, cpu->esp1 - 1 - i * PAGE_SIZE); 326 pin_page(cpu, cpu->esp1 - 1 - i * PAGE_SIZE);
327} 327}
328 328
329/* Direct traps also mean that we need to know whenever the Guest wants to use 329/* Direct traps also mean that we need to know whenever the Guest wants to use