aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/vmi_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/vmi_32.c')
-rw-r--r--arch/x86/kernel/vmi_32.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c
index 4cfda7dbe90f..a635b22de25f 100644
--- a/arch/x86/kernel/vmi_32.c
+++ b/arch/x86/kernel/vmi_32.c
@@ -62,6 +62,7 @@ static struct {
62 void (*cpuid)(void /* non-c */); 62 void (*cpuid)(void /* non-c */);
63 void (*_set_ldt)(u32 selector); 63 void (*_set_ldt)(u32 selector);
64 void (*set_tr)(u32 selector); 64 void (*set_tr)(u32 selector);
65 void (*write_idt_entry)(struct desc_struct *, int, u32, u32);
65 void (*set_kernel_stack)(u32 selector, u32 sp0); 66 void (*set_kernel_stack)(u32 selector, u32 sp0);
66 void (*allocate_page)(u32, u32, u32, u32, u32); 67 void (*allocate_page)(u32, u32, u32, u32, u32);
67 void (*release_page)(u32, u32); 68 void (*release_page)(u32, u32);
@@ -214,6 +215,12 @@ static void vmi_set_tr(void)
214 vmi_ops.set_tr(GDT_ENTRY_TSS*sizeof(struct desc_struct)); 215 vmi_ops.set_tr(GDT_ENTRY_TSS*sizeof(struct desc_struct));
215} 216}
216 217
218static void vmi_write_idt_entry(gate_desc *dt, int entry, const gate_desc *g)
219{
220 u32 *idt_entry = (u32 *)g;
221 vmi_ops.write_idt_entry(dt, entry, idt_entry[0], idt_entry[2]);
222}
223
217static void vmi_load_sp0(struct tss_struct *tss, 224static void vmi_load_sp0(struct tss_struct *tss,
218 struct thread_struct *thread) 225 struct thread_struct *thread)
219{ 226{
@@ -792,7 +799,8 @@ static inline int __init activate_vmi(void)
792 pv_cpu_ops.load_tls = vmi_load_tls; 799 pv_cpu_ops.load_tls = vmi_load_tls;
793 para_fill(pv_cpu_ops.write_ldt_entry, WriteLDTEntry); 800 para_fill(pv_cpu_ops.write_ldt_entry, WriteLDTEntry);
794 para_fill(pv_cpu_ops.write_gdt_entry, WriteGDTEntry); 801 para_fill(pv_cpu_ops.write_gdt_entry, WriteGDTEntry);
795 para_fill(pv_cpu_ops.write_idt_entry, WriteIDTEntry); 802 para_wrap(pv_cpu_ops.write_idt_entry, vmi_write_idt_entry,
803 write_idt_entry, WriteIDTEntry);
796 para_wrap(pv_cpu_ops.load_sp0, vmi_load_sp0, set_kernel_stack, UpdateKernelStack); 804 para_wrap(pv_cpu_ops.load_sp0, vmi_load_sp0, set_kernel_stack, UpdateKernelStack);
797 para_fill(pv_cpu_ops.set_iopl_mask, SetIOPLMask); 805 para_fill(pv_cpu_ops.set_iopl_mask, SetIOPLMask);
798 para_fill(pv_cpu_ops.io_delay, IODelay); 806 para_fill(pv_cpu_ops.io_delay, IODelay);