PERFORCE change 89493 for review

Kip Macy kmacy at FreeBSD.org
Tue Jan 10 23:11:53 PST 2006


http://perforce.freebsd.org/chv.cgi?CH=89493

Change 89493 by kmacy at kmacy:freebsd7_xen3 on 2006/01/11 07:11:09

	change control flow in segment setting slightly to remove some ifdefs

Affected files ...

.. //depot/projects/xen3/src/sys/i386/i386/sys_machdep.c#3 edit

Differences ...

==== //depot/projects/xen3/src/sys/i386/i386/sys_machdep.c#3 (text+ko) ====

@@ -170,11 +170,8 @@
 			 */
 			sd.sd_lobase = base & 0xffffff;
 			sd.sd_hibase = (base >> 24) & 0xff;
-#ifndef XEN
+
 			sd.sd_lolimit = 0xffff;	/* 4GB limit, wraps around */
-#else
-			sd.sd_lolimit = 0x0;	/* 4GB limit, wraps around */
-#endif
 			sd.sd_hilimit = 0xf;
 			sd.sd_type  = SDT_MEMRWA;
 			sd.sd_dpl   = SEL_UPL;
@@ -183,12 +180,14 @@
 			sd.sd_def32 = 1;
 			sd.sd_gran  = 1;
 			critical_enter();
-			td->td_pcb->pcb_fsd = sd;
 #ifndef XEN
 			PCPU_GET(fsgs_gdt)[0] = sd;
 #else
-			HYPERVISOR_update_descriptor(vtomach(&PCPU_GET(fsgs_gdt)[1]), *(uint64_t *)&sd);
+			sd.sd_lolimit = 0x0;	/* < 4GB limit */
+			HYPERVISOR_update_descriptor(vtomach(&PCPU_GET(fsgs_gdt)[1]), 
+						     *(uint64_t *)&sd);
 #endif
+			td->td_pcb->pcb_fsd = sd;
 			critical_exit();
 			td->td_frame->tf_fs = GSEL(GUFS_SEL, SEL_UPL);
 		}
@@ -208,11 +207,8 @@
 			 */
 			sd.sd_lobase = base & 0xffffff;
 			sd.sd_hibase = (base >> 24) & 0xff;
-#ifndef XEN
+
 			sd.sd_lolimit = 0xffff;	/* 4GB limit, wraps around */
-#else
-			sd.sd_lolimit = 0x0;	/* 4GB limit, wraps around */
-#endif
 			sd.sd_hilimit = 0xf;
 			sd.sd_type  = SDT_MEMRWA;
 			sd.sd_dpl   = SEL_UPL;
@@ -221,12 +217,14 @@
 			sd.sd_def32 = 1;
 			sd.sd_gran  = 1;
 			critical_enter();
-			td->td_pcb->pcb_gsd = sd;
 #ifndef XEN
 			PCPU_GET(fsgs_gdt)[1] = sd;
 #else
-			HYPERVISOR_update_descriptor(vtomach(&PCPU_GET(fsgs_gdt)[1]), *(uint64_t *)&sd);
+			sd.sd_lolimit = 0x0;	/* 4GB limit, wraps around */
+			HYPERVISOR_update_descriptor(vtomach(&PCPU_GET(fsgs_gdt)[1]), 
+						     *(uint64_t *)&sd);
 #endif
+			td->td_pcb->pcb_gsd = sd;
 			critical_exit();
 			load_gs(GSEL(GUGS_SEL, SEL_UPL));
 		}


More information about the p4-projects mailing list