From owner-p4-projects@FreeBSD.ORG Wed Jan 11 07:11:52 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4593816A422; Wed, 11 Jan 2006 07:11:52 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F34D216A41F for ; Wed, 11 Jan 2006 07:11:51 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD0B943D48 for ; Wed, 11 Jan 2006 07:11:51 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k0B7Bpeo051267 for ; Wed, 11 Jan 2006 07:11:51 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k0B7BpLH051264 for perforce@freebsd.org; Wed, 11 Jan 2006 07:11:51 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 11 Jan 2006 07:11:51 GMT Message-Id: <200601110711.k0B7BpLH051264@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 89493 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 07:11:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=89493 Change 89493 by kmacy@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)); }