Hi, Is it possible to have xen run a guest OS that doesn''t use paging. Can I present just a continuous block of memory, that just represents the real memory available to the domain, to the guest, and not the expanded amount that paging would allow, so that in the guest I dont have to worry about maintaining a page table and such. Best regards Ivan Kelly _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> Is it possible to have xen run a guest OS that doesn''t use paging. Can I > present just a continuous block of memory, that just represents the real > memory available to the domain, to the guest, and not the expanded amount > that paging would allow, so that in the guest I dont have to worry about > maintaining a page table and such.Well... the guest OS has to run in protected mode, so there has to be a page table somewhere... But you don''t have to do anything fancy with it. Is this for a custom guest? The domain builder will give you a set of bootstrap pagetables - this might even be enough for your if your guest OS has tiny memory requirements. If you need more, your guest should probably build one pagetable at startup that maps all of the available memory, then use that table for everything. Does that answer your question? Cheers, Mark _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> Is this for a custom guest? The domain builder will give you a set of > bootstrap pagetables - this might even be enough for your if your guest OS > has tiny memory requirements. If you need more, your guest should probably > build one pagetable at startup that maps all of the available memory, then > use that table for everything.im porting minix, so the custom guest will be that. Im having to create a new builder for it, because it''s a.out format and only compiles with amsterdam compiler kit. porting to gcc would be quite a big job. the kernel image itself is also a strange format, not just a.out, but multiple a.out processes concatenated together. For these reasons i decided a new builder was needed. could I get the builder to map all the available memory into the bootstrap pagetables? Regards Ivan Kelly _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
A minix version which support paging is out there. www.minix-vmd.org Best wishes, Gabriel Gonzalez. On 11/7/05, Ivan Kelly <ivan@ivankelly.net> wrote:> > Is this for a custom guest? The domain builder will give you a set of > > bootstrap pagetables - this might even be enough for your if your guest OS > > has tiny memory requirements. If you need more, your guest should probably > > build one pagetable at startup that maps all of the available memory, then > > use that table for everything. > im porting minix, so the custom guest will be that. Im having to create a new > builder for it, because it''s a.out format and only compiles with amsterdam > compiler kit. porting to gcc would be quite a big job. the kernel image itself > is also a strange format, not just a.out, but multiple a.out processes > concatenated together. For these reasons i decided a new builder was needed. > could I get the builder to map all the available memory into the bootstrap > pagetables? > Regards > Ivan Kelly > > _______________________________________________ > 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
> im porting minix, so the custom guest will be that.Ah, cool! It''d be nice to have Minix running.> Im having to create a > new builder for it, because it''s a.out format and only compiles with > amsterdam compiler kit. porting to gcc would be quite a big job. the kernel > image itself is also a strange format, not just a.out, but multiple a.out > processes concatenated together. For these reasons i decided a new builder > was needed. could I get the builder to map all the available memory into > the bootstrap pagetables?IMO, if you really need a Minix-specific builder, you might as well have it set up the page tables for you too. This will probably make life simpler for development, in any case. Cheers, Mark _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> IMO, if you really need a Minix-specific builder, you might as well have it > set up the page tables for you too. This will probably make life simpler for > development, in any case.ok, so in this scenario, id have to create a page table with a 1-1 mapping of page frames to page table entries in the builder? would I still need to put code in the minix kernel itself to handle page faults, or is it possible to have all pages loaded from start of day, but calling something in the builder? Regards Ivan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> > IMO, if you really need a Minix-specific builder, you might as well have > > it set up the page tables for you too. This will probably make life > > simpler for development, in any case. > > ok, so in this scenario, id have to create a page table with a 1-1 mapping > of page frames to page table entries in the builder?That would give you a flat linear memory space, enabling you to largely ignore the fact that paging is active...> would I still need to > put code in the minix kernel itself to handle page faults, or is it > possible to have all pages loaded from start of day, but calling something > in the builder?I guess I''m not clear what memory model you need for Minix, can you clarify? What version of Minix is this? Does it really not do any virtual memory of its own? Does it do any tricks at all (demand paging? page sharing?), or does it run unpaged or something else? Domains get a hard allocation of real memory, so when the pages get populated is entirely up to the guest; Xen won''t interfere. If you essentially want to pretend you''ve got a flat, unpaged address space then you should be able to just be able to build a set of page tables (for instance in your custom builder) and then pretend they''re not there. Just remember that you can''t use the very top part of the address space because Xen will be mapped there. If Minix actually expects to use page tables for something then you''ll have to do more work in the memory management department to make it work under Xen... HTH, Mark _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Mon, Nov 07, 2005 at 05:26:19PM +0000, Mark Williamson wrote:> I guess I''m not clear what memory model you need for Minix, can you clarify? > What version of Minix is this? Does it really not do any virtual memory of > its own? Does it do any tricks at all (demand paging? page sharing?), or > does it run unpaged or something else?well, minix uses segmentation but doesn''t use paging at all, because it''s build to be portable and not all processers have a mmu unit(i think the arm doesn''t and such). Im using minix 3.> > Domains get a hard allocation of real memory, so when the pages get populated > is entirely up to the guest; Xen won''t interfere.What about page faults? Will I have to have to write code to handle these, or can I assume that since im only ever using memory thats alreayd mapped, page faults wont occur?> > If you essentially want to pretend you''ve got a flat, unpaged address space > then you should be able to just be able to build a set of page tables (for > instance in your custom builder) and then pretend they''re not there. Just > remember that you can''t use the very top part of the address space because > Xen will be mapped there.Thats exactly what I want. Does the 64M address space need to have entries in my page table or can i just make my guest''s pagetable from 64M-xxM. Also, is there are any pages allocated in this 64M address space, will they my allocated from the domains pool of page frames, or from dom0''s? Best regards Ivan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
If you have A box with VT cpus, then you can try the unmodified (vmx) guest. Eg the old DOS can boot on top of it. It is also used to boot windows guests on top of Xen. With vmxloader guest thinks that it is in real mode but actually it is running in the vm86 mode. Thanks & Regards, Nitin ------------------------------------------------------------------------ ----------- Open Source Technology Center, Intel Corp>-----Original Message----- >From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel- >bounces@lists.xensource.com] On Behalf Of Ivan Kelly >Sent: Sunday, November 06, 2005 4:12 PM >To: xen-devel@lists.xensource.com >Subject: [Xen-devel] Guest OS without paging > >Hi, >Is it possible to have xen run a guest OS that doesn''t use paging. CanI>present just a continuous block of memory, that just represents thereal>memory available to the domain, to the guest, and not the expandedamount>that >paging would allow, so that in the guest I dont have to worry about >maintaining a page table and such. >Best regards >Ivan Kelly > >_______________________________________________ >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
On Mon, Nov 07, 2005 at 11:48:57AM -0800, Kamble, Nitin A wrote:> If you have A box with VT cpus, then you can try the unmodified (vmx) > guest. Eg the old DOS can boot on top of it. It is also used to boot > windows guests on top of Xen. With vmxloader guest thinks that it is in > real mode but actually it is running in the vm86 mode.My project is to port minix to xen, so doing as you suggest wouldn''t get me the best of marks ;) Thanks for the suggestion though, ill look into it. -ivan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> > I guess I''m not clear what memory model you need for Minix, can you > > clarify? What version of Minix is this? Does it really not do any > > virtual memory of its own? Does it do any tricks at all (demand paging? > > page sharing?), or does it run unpaged or something else? > > well, minix uses segmentation but doesn''t use paging at all, because it''s > build to be portable and not all processers have a mmu unit(i think the arm > doesn''t and such). Im using minix 3.OK, I thought it might be something like that; it does, after all, date back to the days of the XT, etc.> > Domains get a hard allocation of real memory, so when the pages get > > populated is entirely up to the guest; Xen won''t interfere. > > What about page faults? Will I have to have to write code to handle these, > or can I assume that since im only ever using memory thats alreayd mapped, > page faults wont occur?If your builder correctly sets up the page table to map all your memory and you never access memory that''s not mapped, you''ll never get a page fault. "Correctly" here assmes "writable where appropriate" and "NX not set, where appropriate", otherwise you''ll get protection violations.> Thats exactly what I want. Does the 64M address space need to have entries > in my page table or can i just make my guest''s pagetable from 64M-xxM. > Also, is there are any pages allocated in this 64M address space, will they > my allocated from the domains pool of page frames, or from dom0''s?Xen wants to be in the top of your address space... For Linux, BSD, etc. this is above where the kernel is mapped (for this reason, the upper limit of the kernel VA space is reduced for the native ports of these OSes). I''ve no idea what Minix does here. Any pages allocated in that space belong to Xen, not to dom0 or your domain - you never get access to them anyhow. You don''t need to care about them... IIRC, Xen will stick its own entries into the top part of your page table: just don''t use the top part of the VA space and Xen should take care of itself. Cheers, Mark _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> well, minix uses segmentation but doesn''t use paging at all, because it''s > build to be portable and not all processers have a mmu unit(i think the arm > doesn''t and such). Im using minix 3.Out of interest, what exactly does it do with segmentation? Most CPUs don''t have segmentation hardware at all... I can imagine ways they might have overlaid it on the flat memory model without affective other ports though... Task isolation? Kernel / user protection? Cheers, Mark> > Domains get a hard allocation of real memory, so when the pages get > > populated is entirely up to the guest; Xen won''t interfere. > > What about page faults? Will I have to have to write code to handle these, > or can I assume that since im only ever using memory thats alreayd mapped, > page faults wont occur? > > > If you essentially want to pretend you''ve got a flat, unpaged address > > space then you should be able to just be able to build a set of page > > tables (for instance in your custom builder) and then pretend they''re not > > there. Just remember that you can''t use the very top part of the address > > space because Xen will be mapped there. > > Thats exactly what I want. Does the 64M address space need to have entries > in my page table or can i just make my guest''s pagetable from 64M-xxM. > Also, is there are any pages allocated in this 64M address space, will they > my allocated from the domains pool of page frames, or from dom0''s? > Best regards > Ivan > > _______________________________________________ > 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
> I haven''t looked too deeply into the segmentation, but it''s using a GDT so > it is doing something with it. I''ll update you when i find out more.x86 forces you to set up segmentation whether you actually want to use it or not... It may not be doing anything with it - people who want to ignore segmentation happily create a 0-4Gig segment, then pretend they have a flat (or paged) memory model. Crazy crazy architecture ;-) Cheers, Mark _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, Nov 09, 2005 at 01:19:10PM +0000, Mark Williamson wrote:> Out of interest, what exactly does it do with segmentation? Most CPUs don''t > have segmentation hardware at all... I can imagine ways they might have > overlaid it on the flat memory model without affective other ports though... > Task isolation? Kernel / user protection?I haven''t looked too deeply into the segmentation, but it''s using a GDT so it is doing something with it. I''ll update you when i find out more. Regards Ivan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel