diff options
Diffstat (limited to 'drivers/lguest/lguest.c')
| -rw-r--r-- | drivers/lguest/lguest.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/lguest/lguest.c b/drivers/lguest/lguest.c index 1bc1546c7fd0..524beea7fb19 100644 --- a/drivers/lguest/lguest.c +++ b/drivers/lguest/lguest.c | |||
| @@ -323,9 +323,12 @@ static void lguest_write_gdt_entry(struct desc_struct *dt, | |||
| 323 | * __thread variables). So we have a hypercall specifically for this case. */ | 323 | * __thread variables). So we have a hypercall specifically for this case. */ |
| 324 | static void lguest_load_tls(struct thread_struct *t, unsigned int cpu) | 324 | static void lguest_load_tls(struct thread_struct *t, unsigned int cpu) |
| 325 | { | 325 | { |
| 326 | /* There's one problem which normal hardware doesn't have: the Host | ||
| 327 | * can't handle us removing entries we're currently using. So we clear | ||
| 328 | * the GS register here: if it's needed it'll be reloaded anyway. */ | ||
| 329 | loadsegment(gs, 0); | ||
| 326 | lazy_hcall(LHCALL_LOAD_TLS, __pa(&t->tls_array), cpu, 0); | 330 | lazy_hcall(LHCALL_LOAD_TLS, __pa(&t->tls_array), cpu, 0); |
| 327 | } | 331 | } |
| 328 | /*:*/ | ||
| 329 | 332 | ||
| 330 | /*G:038 That's enough excitement for now, back to ploughing through each of | 333 | /*G:038 That's enough excitement for now, back to ploughing through each of |
| 331 | * the paravirt_ops (we're about 1/3 of the way through). | 334 | * the paravirt_ops (we're about 1/3 of the way through). |
| @@ -687,7 +690,8 @@ static struct clocksource lguest_clock = { | |||
| 687 | .rating = 400, | 690 | .rating = 400, |
| 688 | .read = lguest_clock_read, | 691 | .read = lguest_clock_read, |
| 689 | .mask = CLOCKSOURCE_MASK(64), | 692 | .mask = CLOCKSOURCE_MASK(64), |
| 690 | .mult = 1, | 693 | .mult = 1 << 22, |
| 694 | .shift = 22, | ||
| 691 | }; | 695 | }; |
| 692 | 696 | ||
| 693 | /* The "scheduler clock" is just our real clock, adjusted to start at zero */ | 697 | /* The "scheduler clock" is just our real clock, adjusted to start at zero */ |
| @@ -770,7 +774,6 @@ static void lguest_time_init(void) | |||
| 770 | * way, the "rating" is initialized so high that it's always chosen | 774 | * way, the "rating" is initialized so high that it's always chosen |
| 771 | * over any other clocksource. */ | 775 | * over any other clocksource. */ |
| 772 | if (lguest_data.tsc_khz) { | 776 | if (lguest_data.tsc_khz) { |
| 773 | lguest_clock.shift = 22; | ||
| 774 | lguest_clock.mult = clocksource_khz2mult(lguest_data.tsc_khz, | 777 | lguest_clock.mult = clocksource_khz2mult(lguest_data.tsc_khz, |
| 775 | lguest_clock.shift); | 778 | lguest_clock.shift); |
| 776 | lguest_clock.flags = CLOCK_SOURCE_IS_CONTINUOUS; | 779 | lguest_clock.flags = CLOCK_SOURCE_IS_CONTINUOUS; |
