From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Limpach Subject: Xen1.2 NetBSD port snapshot available and set_gdt patch for Xen1.2 Date: Tue, 3 Feb 2004 02:57:59 +0100 Sender: xen-devel-admin@lists.sourceforge.net Message-ID: <200402030156.i131uBs25250@mail.Pin.LU> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="785126-31820-1075773480=:500" Return-path: Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: xen-devel@lists.sourceforge.net List-Id: xen-devel@lists.xenproject.org --785126-31820-1075773480=:500 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Disposition: INLINE Hi! I've updated the NetBSD port to Xen1.2. Updated files are available at http://lola.pin.lu/netbsd/xen/ See http://lola.pin.lu/netbsd/xen/readme-040203 for details. Domain creation is now possible using the xc_dom_*.py tools. I've also found a bug in Xen1.2 and to run NetBSD you'll have to apply a patch until this is fixed in the repository. set_gdt() copies Xen's GDT entries to the wrong page, this instantly kills the hypervisor when the new GDT is activated. Also the check for new GDT pages does always check the first GDT page, which allows installing arbitrary GDT entries. --785126-31820-1075773480=:500 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="xen1.2_gdt.diff" Content-Disposition: INLINE; FILENAME="xen1.2_gdt.diff" --- ../../xeno-1.2.bk/xen/arch/i386/mm.c 2004-01-21 14:57:32.000000000 +0100 +++ xen/arch/i386/mm.c 2004-02-02 21:35:35.000000000 +0100 @@ -238,7 +238,7 @@ long set_gdt(struct task_struct *p, goto out; /* Check all potential GDT entries in the page. */ - gdt_page = map_domain_mem(frames[0] << PAGE_SHIFT); + gdt_page = map_domain_mem(frames[i] << PAGE_SHIFT); for ( j = 0; j < 512; j++ ) if ( !check_descriptor(gdt_page[j*2], gdt_page[j*2+1]) ) goto out; @@ -274,7 +274,7 @@ long set_gdt(struct task_struct *p, } /* Copy reserved GDT entries to the new GDT. */ - vgdt = map_domain_mem(frames[i] << PAGE_SHIFT); + vgdt = map_domain_mem(frames[0] << PAGE_SHIFT); memcpy(vgdt + FIRST_RESERVED_GDT_ENTRY, gdt_table + FIRST_RESERVED_GDT_ENTRY, NR_RESERVED_GDT_ENTRIES*8); --785126-31820-1075773480=:500 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Disposition: INLINE -- Christian Limpach --785126-31820-1075773480=:500-- ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn