/* This is the fast-track version for just changing the three TLS entries. Remember that this happens on every context switch, so it's worth optimizing. But wouldn't it be neater to have a single hypercall to cover both cases?  */
void guest_load_tls(struct lg_cpu *cpu, unsigned long gtls)
/* This is the fast-track version for just changing the three TLS entries. Remember that this happens on every context switch, so it's worth optimizing. But wouldn't it be neater to have a single hypercall to cover both cases?  */
void guest_load_tls(struct lg_cpu *cpu, unsigned long gtls)
{
	struct desc_struct *tls = &cpu->arch.gdt[GDT_ENTRY_TLS_MIN];
	__lgread(cpu, tls, gtls, sizeof(*tls)*GDT_ENTRY_TLS_ENTRIES);
	fixup_gdt_table(cpu, GDT_ENTRY_TLS_MIN, GDT_ENTRY_TLS_MAX+1);
	cpu->changed |= CHANGED_GDT_TLS;
}