lguest: update comments to reflect LHCALL_LOAD_GDT_ENTRY.
We used to have a hypercall which reloaded the entire GDT, then we switched to one which loaded a single entry (to match the IDT code). Some comments were not updated, so fix them. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reported by: Eviatar Khen <eviatarkhen@gmail.com>
This commit is contained in:
@@ -324,9 +324,8 @@ static void lguest_load_gdt(const struct desc_ptr *desc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For a single GDT entry which changes, we do the lazy thing: alter our GDT,
|
* For a single GDT entry which changes, we simply change our copy and
|
||||||
* then tell the Host to reload the entire thing. This operation is so rare
|
* then tell the host about it.
|
||||||
* that this naive implementation is reasonable.
|
|
||||||
*/
|
*/
|
||||||
static void lguest_write_gdt_entry(struct desc_struct *dt, int entrynum,
|
static void lguest_write_gdt_entry(struct desc_struct *dt, int entrynum,
|
||||||
const void *desc, int type)
|
const void *desc, int type)
|
||||||
@@ -338,9 +337,13 @@ static void lguest_write_gdt_entry(struct desc_struct *dt, int entrynum,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* OK, I lied. There are three "thread local storage" GDT entries which change
|
* There are three "thread local storage" GDT entries which change
|
||||||
* on every context switch (these three entries are how glibc implements
|
* on every context switch (these three entries are how glibc implements
|
||||||
* __thread variables). So we have a hypercall specifically for this case.
|
* __thread variables). As an optimization, we have a hypercall
|
||||||
|
* specifically for this case.
|
||||||
|
*
|
||||||
|
* Wouldn't it be nicer to have a general LOAD_GDT_ENTRIES hypercall
|
||||||
|
* which took a range of entries?
|
||||||
*/
|
*/
|
||||||
static void lguest_load_tls(struct thread_struct *t, unsigned int cpu)
|
static void lguest_load_tls(struct thread_struct *t, unsigned int cpu)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user