diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-01-07 08:05:35 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-01-30 06:50:13 -0500 |
commit | 4665ac8e28c30c2a015c617c55783c0bf3a49c05 (patch) | |
tree | 15992d7e693126be7f758e694c8a544306576dfd /drivers/lguest/hypercalls.c | |
parent | 66686c2ab08feb721ca4d98285fba64acdf6017f (diff) |
lguest: makes special fields be per-vcpu
lguest struct have room for some fields, namely, cr2, ts, esp1
and ss1, that are not really guest-wide, but rather, vcpu-wide.
This patch puts it in the vcpu struct
Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest/hypercalls.c')
-rw-r--r-- | drivers/lguest/hypercalls.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/lguest/hypercalls.c b/drivers/lguest/hypercalls.c index 83323b1cc0b2..ab70bbebdf25 100644 --- a/drivers/lguest/hypercalls.c +++ b/drivers/lguest/hypercalls.c | |||
@@ -60,7 +60,7 @@ static void do_hcall(struct lg_cpu *cpu, struct hcall_args *args) | |||
60 | /* FLUSH_TLB comes in two flavors, depending on the | 60 | /* FLUSH_TLB comes in two flavors, depending on the |
61 | * argument: */ | 61 | * argument: */ |
62 | if (args->arg1) | 62 | if (args->arg1) |
63 | guest_pagetable_clear_all(lg); | 63 | guest_pagetable_clear_all(cpu); |
64 | else | 64 | else |
65 | guest_pagetable_flush_user(lg); | 65 | guest_pagetable_flush_user(lg); |
66 | break; | 66 | break; |
@@ -68,10 +68,10 @@ static void do_hcall(struct lg_cpu *cpu, struct hcall_args *args) | |||
68 | /* All these calls simply pass the arguments through to the right | 68 | /* All these calls simply pass the arguments through to the right |
69 | * routines. */ | 69 | * routines. */ |
70 | case LHCALL_NEW_PGTABLE: | 70 | case LHCALL_NEW_PGTABLE: |
71 | guest_new_pagetable(lg, args->arg1); | 71 | guest_new_pagetable(cpu, args->arg1); |
72 | break; | 72 | break; |
73 | case LHCALL_SET_STACK: | 73 | case LHCALL_SET_STACK: |
74 | guest_set_stack(lg, args->arg1, args->arg2, args->arg3); | 74 | guest_set_stack(cpu, args->arg1, args->arg2, args->arg3); |
75 | break; | 75 | break; |
76 | case LHCALL_SET_PTE: | 76 | case LHCALL_SET_PTE: |
77 | guest_set_pte(lg, args->arg1, args->arg2, __pte(args->arg3)); | 77 | guest_set_pte(lg, args->arg1, args->arg2, __pte(args->arg3)); |
@@ -84,7 +84,7 @@ static void do_hcall(struct lg_cpu *cpu, struct hcall_args *args) | |||
84 | break; | 84 | break; |
85 | case LHCALL_TS: | 85 | case LHCALL_TS: |
86 | /* This sets the TS flag, as we saw used in run_guest(). */ | 86 | /* This sets the TS flag, as we saw used in run_guest(). */ |
87 | lg->ts = args->arg1; | 87 | cpu->ts = args->arg1; |
88 | break; | 88 | break; |
89 | case LHCALL_HALT: | 89 | case LHCALL_HALT: |
90 | /* Similarly, this sets the halted flag for run_guest(). */ | 90 | /* Similarly, this sets the halted flag for run_guest(). */ |
@@ -191,7 +191,7 @@ static void initialize(struct lg_cpu *cpu) | |||
191 | * first write to a Guest page. This may have caused a copy-on-write | 191 | * first write to a Guest page. This may have caused a copy-on-write |
192 | * fault, but the old page might be (read-only) in the Guest | 192 | * fault, but the old page might be (read-only) in the Guest |
193 | * pagetable. */ | 193 | * pagetable. */ |
194 | guest_pagetable_clear_all(lg); | 194 | guest_pagetable_clear_all(cpu); |
195 | } | 195 | } |
196 | 196 | ||
197 | /*H:100 | 197 | /*H:100 |