WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: Mini-OS in dom0 - virtual memory problems

To: Julian Stecklina <der_julian@xxxxxx>
Subject: Re: [Xen-devel] Re: Mini-OS in dom0 - virtual memory problems
From: Grzegorz Milos <gm281@xxxxxxxxx>
Date: Thu, 01 Feb 2007 01:06:58 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 31 Jan 2007 16:06:39 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <epqsah$50f$1@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <epaci3$o96$1@xxxxxxxxxxxxx> <45BFBD2A.5060509@xxxxxxxxx> <epqsah$50f$1@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.9 (X11/20070104)
Mini-OS assumes that the start of the text section is also the beginning of virtual address space[1]. However, it is generally bad idea not to start virtual address space at 4Mb boundary. The easiest way to fix your problem is to move text to 0xc0000000 or 0xc0400000. More extensive fix, which decouples VIRT_START from &_text is also possible, but I don't see a reason why it would be needed. Instead I've included a runtime check. Keir could you apply the patch?

I changed the beginning of text to 0xC0000000 and the page table setup seems to work, as does the rest of Mini-OS (except XenBus of course). Thank you very much!

There was indeed a XenBus bug, where request structures wouldn't be marked as free (Keir could you apply the attached patch?), however I don't think that's what you are referring to. What problems do you observe?

Cheers
Gregor
diff -r 34ab61cd89bb extras/mini-os/xenbus/xenbus.c
--- a/extras/mini-os/xenbus/xenbus.c    Tue Jan 30 21:26:45 2007 +0000
+++ b/extras/mini-os/xenbus/xenbus.c    Wed Jan 31 23:57:41 2007 +0000
@@ -178,6 +178,7 @@ static void release_xenbus_id(int id)
     BUG_ON(!req_info[id].in_use);
     spin_lock(&req_lock);
     nr_live_reqs--;
+    req_info[id].in_use = 0;
     if (nr_live_reqs == NR_REQS - 1)
         wake_up(&req_wq);
     spin_unlock(&req_lock);
@@ -212,6 +213,7 @@ static int allocate_xenbus_id(void)
     probe = o_probe + 1;
     spin_unlock(&req_lock);
     init_waitqueue_head(&req_info[o_probe].waitq);
+
     return o_probe;
 }
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>