diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-01-30 13:31:13 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 13:31:13 +0100 |
commit | 75b8bb3e56ca09a467fbbe5229bc68627f7445be (patch) | |
tree | b0eba1d65eb2022fbda902c99edd066b1b3f34da /arch | |
parent | 014b15be30c04622d130946ab7c0a9101b523a8a (diff) |
x86: change write_ldt_entry signature
this patch changes the signature of write_ldt_entry.
Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
CC: Zachary Amsden <zach@vmware.com>
CC: Jeremy Fitzhardinge <Jeremy.Fitzhardinge.citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/ldt.c | 3 | ||||
-rw-r--r-- | arch/x86/kernel/paravirt_32.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/vmi_32.c | 11 | ||||
-rw-r--r-- | arch/x86/xen/enlighten.c | 4 |
4 files changed, 14 insertions, 6 deletions
diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c index 3e872b46853..b8ef46270e2 100644 --- a/arch/x86/kernel/ldt.c +++ b/arch/x86/kernel/ldt.c @@ -229,8 +229,7 @@ static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode) /* Install the new entry ... */ install: - write_ldt_entry(mm->context.ldt, ldt_info.entry_number, - ldt.a, ldt.b); + write_ldt_entry(mm->context.ldt, ldt_info.entry_number, &ldt); error = 0; out_unlock: diff --git a/arch/x86/kernel/paravirt_32.c b/arch/x86/kernel/paravirt_32.c index 77602c1252d..dd063fba2b2 100644 --- a/arch/x86/kernel/paravirt_32.c +++ b/arch/x86/kernel/paravirt_32.c @@ -379,7 +379,7 @@ struct pv_cpu_ops pv_cpu_ops = { .store_idt = native_store_idt, .store_tr = native_store_tr, .load_tls = native_load_tls, - .write_ldt_entry = write_dt_entry, + .write_ldt_entry = native_write_ldt_entry, .write_gdt_entry = native_write_gdt_entry, .write_idt_entry = native_write_idt_entry, .load_sp0 = native_load_sp0, diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c index 21edd0d6eae..10c46419d35 100644 --- a/arch/x86/kernel/vmi_32.c +++ b/arch/x86/kernel/vmi_32.c @@ -64,6 +64,7 @@ static struct { void (*set_tr)(u32 selector); void (*write_idt_entry)(struct desc_struct *, int, u32, u32); void (*write_gdt_entry)(struct desc_struct *, int, u32, u32); + void (*write_ldt_entry)(struct desc_struct *, int, u32, u32); void (*set_kernel_stack)(u32 selector, u32 sp0); void (*allocate_page)(u32, u32, u32, u32, u32); void (*release_page)(u32, u32); @@ -229,6 +230,13 @@ static void vmi_write_gdt_entry(struct desc_struct *dt, int entry, vmi_ops.write_gdt_entry(dt, entry, gdt_entry[0], gdt_entry[2]); } +static void vmi_write_ldt_entry(struct desc_struct *dt, int entry, + const void *desc) +{ + u32 *ldt_entry = (u32 *)desc; + vmi_ops.write_idt_entry(dt, entry, ldt_entry[0], ldt_entry[2]); +} + static void vmi_load_sp0(struct tss_struct *tss, struct thread_struct *thread) { @@ -805,7 +813,8 @@ static inline int __init activate_vmi(void) para_fill(pv_cpu_ops.store_idt, GetIDT); para_fill(pv_cpu_ops.store_tr, GetTR); pv_cpu_ops.load_tls = vmi_load_tls; - para_fill(pv_cpu_ops.write_ldt_entry, WriteLDTEntry); + para_wrap(pv_cpu_ops.write_ldt_entry, vmi_write_ldt_entry, + write_ldt_entry, WriteLDTEntry); para_wrap(pv_cpu_ops.write_gdt_entry, vmi_write_gdt_entry, write_gdt_entry, WriteGDTEntry); para_wrap(pv_cpu_ops.write_idt_entry, vmi_write_idt_entry, diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 7f98c63f638..72dd14d0685 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -357,11 +357,11 @@ static void xen_load_tls(struct thread_struct *t, unsigned int cpu) } static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum, - u32 low, u32 high) + const void *ptr) { unsigned long lp = (unsigned long)&dt[entrynum]; xmaddr_t mach_lp = virt_to_machine(lp); - u64 entry = (u64)high << 32 | low; + u64 entry = *(u64 *)ptr; preempt_disable(); |