All of lore.kernel.org
 help / color / mirror / Atom feed
* Xen1.2 NetBSD port snapshot available and set_gdt patch for Xen1.2
@ 2004-02-03  1:57 Christian Limpach
  2004-02-03  2:37 ` Ian Pratt
  0 siblings, 1 reply; 13+ messages in thread
From: Christian Limpach @ 2004-02-03  1:57 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 593 bytes --]

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.


[-- Attachment #2: xen1.2_gdt.diff --]
[-- Type: TEXT/PLAIN, Size: 924 bytes --]

--- ../../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);

[-- Attachment #3: Type: TEXT/PLAIN, Size: 38 bytes --]


-- 
Christian Limpach <chris@pin.lu>

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2004-02-05 13:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-03  1:57 Xen1.2 NetBSD port snapshot available and set_gdt patch for Xen1.2 Christian Limpach
2004-02-03  2:37 ` Ian Pratt
2004-02-03  3:43   ` Christian Limpach
2004-02-03  8:42     ` Ian Pratt
2004-02-03 11:51       ` Rolf Neugebauer
2004-02-03 15:18         ` Xen1.2 NetBSD port snapshot available and set_gdtpatch " Christian Limpach
2004-02-03 21:49           ` A query I RATTAN
2004-02-05 13:24             ` Yan-Ching CHU
2004-02-05 13:58               ` Bin Ren
2004-02-03 23:27           ` Xen1.2 NetBSD port snapshot available and set_gdtpatch for Xen1.2 Keir Fraser
2004-02-03  8:44     ` Xen1.2 NetBSD port snapshot available and set_gdt patch " Keir Fraser
2004-02-03 14:54       ` Christian Limpach
2004-02-03 15:36         ` Keir Fraser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.