Displaying 4 results from an estimated 4 matches for "gdt_entry_hv_cs".
2007 Apr 18
1
[RFC/PATCH PV_OPS X86_64 05/17] pravirt_ops - segments
...lean-start.orig/include/asm-x86_64/segment.h
+++ clean-start/include/asm-x86_64/segment.h
@@ -37,8 +37,14 @@
#define GS_TLS_SEL ((GDT_ENTRY_TLS_MIN+GS_TLS)*8 + 3)
#define FS_TLS_SEL ((GDT_ENTRY_TLS_MIN+FS_TLS)*8 + 3)
+#define __HV_CS 0x80 /* 16*8 */
+#define __HV_DS 0x88 /* 17*8 */
+
+#define GDT_ENTRY_HV_CS 16
+#define GDT_ENTRY_HV_DS 17
+
#define IDT_ENTRIES 256
-#define GDT_ENTRIES 16
+#define GDT_ENTRIES 18
#define GDT_SIZE (GDT_ENTRIES * 8)
#define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8)
--
2007 Apr 18
1
[RFC/PATCH PV_OPS X86_64 05/17] pravirt_ops - segments
...lean-start.orig/include/asm-x86_64/segment.h
+++ clean-start/include/asm-x86_64/segment.h
@@ -37,8 +37,14 @@
#define GS_TLS_SEL ((GDT_ENTRY_TLS_MIN+GS_TLS)*8 + 3)
#define FS_TLS_SEL ((GDT_ENTRY_TLS_MIN+FS_TLS)*8 + 3)
+#define __HV_CS 0x80 /* 16*8 */
+#define __HV_DS 0x88 /* 17*8 */
+
+#define GDT_ENTRY_HV_CS 16
+#define GDT_ENTRY_HV_DS 17
+
#define IDT_ENTRIES 256
-#define GDT_ENTRIES 16
+#define GDT_ENTRIES 18
#define GDT_SIZE (GDT_ENTRIES * 8)
#define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8)
--
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...;hvaddr=%lx\n",hvaddr);
+
+ lguest_hv_addr = hvaddr;
+ lguest_hv_pages = pages;
+ lguest_hv_offset = hvaddr - (unsigned long)&start_hyper_text;
+
+ /* Setup LGUEST segments on all cpus */
+ for_each_possible_cpu(i) {
+ struct desc_struct *gdt_table;
+ gdt_table = cpu_gdt(i);
+ gdt_table[GDT_ENTRY_HV_CS] = gdt_table[gdt_index(__KERNEL_CS)];
+ gdt_table[GDT_ENTRY_HV_DS] = gdt_table[gdt_index(__KERNEL_DS)];
+ }
+
+// rdmsrl(MSR_LSTAR, *lg_host_syscall);
+// wrmsrl(MSR_LSTAR, lg_hcall);
+ return 0;
+#if 0
+ ret = init_pagetables(hvaddr);
+ if (ret < 0)
+ goto out2;
+
+ return 0;
+
+out2:
+ hvvm_...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...;hvaddr=%lx\n",hvaddr);
+
+ lguest_hv_addr = hvaddr;
+ lguest_hv_pages = pages;
+ lguest_hv_offset = hvaddr - (unsigned long)&start_hyper_text;
+
+ /* Setup LGUEST segments on all cpus */
+ for_each_possible_cpu(i) {
+ struct desc_struct *gdt_table;
+ gdt_table = cpu_gdt(i);
+ gdt_table[GDT_ENTRY_HV_CS] = gdt_table[gdt_index(__KERNEL_CS)];
+ gdt_table[GDT_ENTRY_HV_DS] = gdt_table[gdt_index(__KERNEL_DS)];
+ }
+
+// rdmsrl(MSR_LSTAR, *lg_host_syscall);
+// wrmsrl(MSR_LSTAR, lg_hcall);
+ return 0;
+#if 0
+ ret = init_pagetables(hvaddr);
+ if (ret < 0)
+ goto out2;
+
+ return 0;
+
+out2:
+ hvvm_...