Julian Stecklina
2007-Jan-25 13:49 UTC
[Xen-devel] Mini-OS in dom0 - virtual memory problems
Hello, I am trying to port Mini-OS (from xen-3.0.4-testing) to the domain 0 environment. Setting the right flags in x86_32.S and changing the start of the text section to 0xC0100000 enabled it to boot. I expected that most of the Mini-OS''s functionality to be working except everything that relied on the Xenbus. To my surprise there was an error setting up the virtual memory. Here is the console log: Bootstrapping... Xen Minimal OS! start_info: c0135000 nr_pages: 26700 shared_inf: 00bed000 pt_base: c0136000 mod_start: 0x0 mod_len: 0 flags: 0x3 cmd_line: stack: c0117040-c0119040 MM: Init _text: c0100000 _etext: c010a3b4 _edata: c010b760 stack start: c0117040 _end: c0119494 start_pfn: 3b max_pfn: 684c Mapping memory range 0xc0500000 - 0xc694c000 (XEN) mm.c:1664:d0 Bad type (saw e8000001 != exp 20000000) for mfn 1c3b (pfn 3b) (XEN) mm.c:1960:d0 Error while pinning mfn 1c3b ERROR: pinning failed Do_exit called! The first message from the hypervisor seems very strange. I would be very thankful, if anyone can point to the source of the problem. Regards, Julian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Julian Stecklina
2007-Jan-25 13:55 UTC
[Xen-devel] Re: Mini-OS in dom0 - virtual memory problems
Julian Stecklina wrote:> To my surprise there was an error setting up the virtual memory. Here is > the console log:Perhaps this is helping, too: (XEN) PHYSICAL MEMORY ARRANGEMENT: (XEN) Dom0 alloc.: 01c00000->02000000 (25676 pages to be allocated) (XEN) VIRTUAL MEMORY ARRANGEMENT: (XEN) Loaded kernel: c0100000->c0119494 (XEN) Init. ramdisk: c011a000->c011a000 (XEN) Phys-Mach map: c011a000->c0134130 (XEN) Start info: c0135000->c013546c (XEN) Page tables: c0136000->c0138000 (XEN) Boot stack: c0138000->c0139000 (XEN) TOTAL: c0000000->c0400000 (XEN) ENTRY ADDRESS: c0100000 Regards, Julian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Grzegorz Milos
2007-Jan-30 21:48 UTC
Re: [Xen-devel] Mini-OS in dom0 - virtual memory problems
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? Thanks Gregor [1] include/x86/arch_mm.h line 209: #define VIRT_START ((unsigned long)&_text) Julian Stecklina wrote:> Hello, > > I am trying to port Mini-OS (from xen-3.0.4-testing) to the domain 0 > environment. Setting the right flags in x86_32.S and changing the start > of the text section to 0xC0100000 enabled it to boot. I expected that > most of the Mini-OS''s functionality to be working except everything that > relied on the Xenbus. > > To my surprise there was an error setting up the virtual memory. Here is > the console log: > > Bootstrapping... > Xen Minimal OS! > start_info: c0135000 > nr_pages: 26700 shared_inf: 00bed000 > pt_base: c0136000 mod_start: 0x0 > mod_len: 0 > flags: 0x3 > cmd_line: > stack: c0117040-c0119040 > MM: Init > _text: c0100000 > _etext: c010a3b4 > _edata: c010b760 > stack start: c0117040 > _end: c0119494 > start_pfn: 3b > max_pfn: 684c > Mapping memory range 0xc0500000 - 0xc694c000 > (XEN) mm.c:1664:d0 Bad type (saw e8000001 != exp 20000000) for mfn 1c3b > (pfn 3b) > (XEN) mm.c:1960:d0 Error while pinning mfn 1c3b > ERROR: pinning failed > Do_exit called! > > The first message from the hypervisor seems very strange. I would be > very thankful, if anyone can point to the source of the problem. > > Regards, > Julian > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Julian Stecklina
2007-Jan-31 19:57 UTC
[Xen-devel] Re: Mini-OS in dom0 - virtual memory problems
Grzegorz Milos wrote:> 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! Regards, Julian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Grzegorz Milos
2007-Feb-01 00:06 UTC
Re: [Xen-devel] Re: Mini-OS in dom0 - virtual memory problems
>> 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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel