Hi, Sometimes when I mount a disk image, unmount it, and then try to create a domU using the disk image I get the following error: Error: Device 2049 (vbd) could not be connected. Backend device not found. Im using a FC4 image. Here is the config file: kernel = "/boot/vmlinuz-2.6.16-rc3-xenU" memory=256 name=Domain1 vif = [''bridge=xenbr0''] disk = [ ''file:/root/osimages/fedora.img,sda1,w'' ] root = "/dev/sda1 ro" extra="4" Any idea why this is occuring? Thanks, Adit -- Adit Ranadive MS CS Candidate Georgia Institute of Technology, Atlanta, GA _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi, Did you insmod blkbk? And if you use FC4, you may need to use initrd. Best Regards, Akio Takebe>Hi, > >Sometimes when I mount a disk image, unmount it, and then try to >create a domU using the disk image I get the following error: > >Error: Device 2049 (vbd) could not be connected. Backend device not found. > >Im using a FC4 image. > >Here is the config file: >kernel = "/boot/vmlinuz-2.6.16-rc3-xenU" >memory=256 >name=Domain1 >vif = [''bridge=xenbr0''] >disk = [ ''file:/root/osimages/fedora.img,sda1,w'' ] >root = "/dev/sda1 ro" >extra="4" > >Any idea why this is occuring? > >Thanks, >Adit >-- >Adit Ranadive >MS CS Candidate >Georgia Institute of Technology, >Atlanta, GA > >_______________________________________________ >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
hi In the paravirt case, guestos maintain its own mfn which need m2p and p2m ,or xen manage these ? I am confused about how does guestOS maintain its virt-to-physic and physic-to-mach mapping ,in the linux ,there is only v2p mapping, how does guestOS maintain its p2m mapping ,and when a virt address is put into a mmu, does cpu hardware convert virt-addr into machine address or guest''s phyiscal address? another one does xen in hvm case support balloon for modifying the vm memory size or not? I am confused about it could you help me Thanks in advance _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mark Williamson
2007-Mar-27 03:45 UTC
Re: [Xen-devel] question about memory mapping and balloon
> In the paravirt case, guestos maintain its own mfn which need m2p and > p2m ,or xen manage these ?The guest is aware of it''s mfns. The m2p table is a global machine frame -> pseudophysical frame mapping. Every guest uses this but is only privileged to update their portions of this. There''s no requirement for it to be global but it saves space this way. The p2m is maintained in the guest''s private memory.> I am confused about how does guestOS maintain its virt-to-physic and > physic-to-mach mapping ,in the linux ,there is only v2p mapping, > how does guestOS maintain its p2m mapping ,It''s given initial information about its memory layout at boot time. It stores the p2m in a table and updates it when pages are transferred (e.g. by the balloon driver or by page flipping in the network device). Xen''s global M2P table is mapped into the guest and it keeps this in sync by performing hypercalls to update it.> and when a virt address is > put into a mmu, does cpu hardware convert virt-addr into machine address > or guest''s phyiscal address?To the machine address, since the CPU is not aware that virtualisation is occuring. [1] The guest is responsible for making sure the correct machine addresses are put into its page tables (although Xen won''t let it put machine addresses into the page tables that it shouldn''t have access to!).> another one > does xen in hvm case support balloon for modifying the vm memory size or > not?Not yet, but I believe it''s planned. Note [1]: although the CPU can''t currently do the virtual->pseudophysical->machine translation, this is a planned feature of future AMD and Intel virtualisation-aware processors. It''s sometimes referred to as "nested paging". Other architectures (e.g. zSeries, I suspect) may support this type of functionality already. Cheers, Mark> > I am confused about it > > could you help me > Thanks in advance > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel-- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Thank you for your reply your explanation is helpful Mark Williamson 写道:>> In the paravirt case, guestos maintain its own mfn which need m2p and >> p2m ,or xen manage these ? >> > > The guest is aware of it''s mfns. > > The m2p table is a global machine frame -> pseudophysical frame mapping. > Every guest uses this but is only privileged to update their portions of > this. There''s no requirement for it to be global but it saves space this > way. > > The p2m is maintained in the guest''s private memory. >I do not understand clearly why does xen maintain m2p table and why should the related portion of m2p be exported to the guestOS,and what does guestOS do by using m2p> >> I am confused about how does guestOS maintain its virt-to-physic and >> physic-to-mach mapping ,in the linux ,there is only v2p mapping, >> how does guestOS maintain its p2m mapping , >> > > It''s given initial information about its memory layout at boot time. It > stores the p2m in a table and updates it when pages are transferred (e.g. by > the balloon driver or by page flipping in the network device). Xen''s global > M2P table is mapped into the guest and it keeps this in sync by performing > hypercalls to update it. >when a VM boot with memsize=512M ,its p2m maybe only 64M or something ,and when guest application request the memory,its virtual memory is mapped ,and when the application write some data into that memory,there is a page fault araised,and at that time guestOS update p2m and m2p and its page table(say virtual-to-machine address) ,is it right? or how do xen and guestOS deal with it? could you help me Thanks in advance> >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi, I couldnt find any blkbk module in my dom0 (used modprobe -l). Do i need to configure the module using menuconfig? Tried using an initial ramdisk also but the error still occurs. I was wondering if the error could occur due to mounting and then unmounting of FC4 image? Thanks, Adit On 3/26/07, Akio Takebe <takebe_akio@jp.fujitsu.com> wrote:> Hi, > > Did you insmod blkbk? > And if you use FC4, you may need to use initrd. > > Best Regards, > > Akio Takebe > > >Hi, > > > >Sometimes when I mount a disk image, unmount it, and then try to > >create a domU using the disk image I get the following error: > > > >Error: Device 2049 (vbd) could not be connected. Backend device not found. > > > >Im using a FC4 image. > > > >Here is the config file: > >kernel = "/boot/vmlinuz-2.6.16-rc3-xenU" > >memory=256 > >name=Domain1 > >vif = [''bridge=xenbr0''] > >disk = [ ''file:/root/osimages/fedora.img,sda1,w'' ] > >root = "/dev/sda1 ro" > >extra="4" > > > >Any idea why this is occuring? > > > >Thanks, > >Adit > >-- > >Adit Ranadive > >MS CS Candidate > >Georgia Institute of Technology, > >Atlanta, GA > > > >_______________________________________________ > >Xen-devel mailing list > >Xen-devel@lists.xensource.com > >http://lists.xensource.com/xen-devel > >-- Adit Ranadive MS CS Candidate Georgia Institute of Technology, Atlanta, GA _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi,>I couldnt find any blkbk module in my dom0 (used modprobe -l). Do i >need to configure the module using menuconfig? >Tried using an initial ramdisk also but the error still occurs.Because I don''t have FC4 machine, I don''t know the detail. If your dom0 kernel builtin blkbk, you don''t need to recompile.>I was wondering if the error could occur due to mounting and then >unmounting of FC4 image?Hmm. There are some reason. When you cannot boot domU, are there error messages in xend.log? Best Regards, Akio Takebe _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Thank you for your reply Mark Williamson 写道:>> In the paravirt case, guestos maintain its own mfn which need m2p and >> p2m ,or xen manage these ? >> > > The guest is aware of it''s mfns. > > The m2p table is a global machine frame -> pseudophysical frame > mapping. Every guest uses this but is only privileged to update their > portions of this. There''s no requirement for it to be global but it > saves space this way. > > The p2m is maintained in the guest''s private memory. >I do not understand clearly why does xen maintain m2p table and why should the related portion of m2p be exported to the guestOS,and what does guestOS do by using m2p> >> I am confused about how does guestOS maintain its virt-to-physic and >> physic-to-mach mapping ,in the linux ,there is only v2p mapping, >> how does guestOS maintain its p2m mapping , >> > > It''s given initial information about its memory layout at boot time. > It stores the p2m in a table and updates it when pages are transferred > (e.g. by the balloon driver or by page flipping in the network > device). Xen''s global M2P table is mapped into the guest and it keeps > this in sync by performing hypercalls to update it. >when a VM boot with memsize=512M ,its p2m maybe only 64M or something ,and when guest application request the memory,its virtual memory is mapped ,and when the application write some data into that memory,there is a page fault araised,and at that time guestOS update p2m and m2p and its page table(say virtual-to-machine address) ,is it right? or how do xen and guestOS deal with it? could you help me Thanks in advance> >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mark Williamson
2007-Mar-28 02:11 UTC
Re: [Xen-devel] question about memory mapping and balloon
> Thank you for your replyNo problems. We''re getting into lower lever stuff than I typically touch on, so please bear in mind that my explanations might be bad / incomplete / misleading / wrong ;-) Sorry about that, but I''ll try to elaborate on things as best I can.> Mark Williamson 写道: > >> In the paravirt case, guestos maintain its own mfn which need m2p and > >> p2m ,or xen manage these ? > > > > The guest is aware of it''s mfns. > > > > The m2p table is a global machine frame -> pseudophysical frame > > mapping. Every guest uses this but is only privileged to update their > > portions of this. There''s no requirement for it to be global but it > > saves space this way. > > > > The p2m is maintained in the guest''s private memory. > > I do not understand clearly why does xen maintain m2p table and why > should the related portion of m2p be exported to the guestOS,and what > does guestOS do by using m2pIt''s not technically necessary for Xen to maintain it; guest OSes could do this themselves. Providing it to guests as a service of Xen is an efficiency / simplicity optimisation: guests can index it by mfn and get the corresponding pfn out by a simple array access [nb. a side effect is that guests can see on another''s mfn->pfn mappings]. Because the guests machine memory may be sparse and spread out all over the host''s RAM, it would not be space efficient for individual guests to maintain this mapping as an array - they''d need to use more complex (and slower access) data structures instead. The Xen-provided M2P table allows a simple, fast array to be used for this. The P2M table, on the other hand, can be implemented on a per-guest basis as it is densely populated and indexed by the contiguous physical pfns. The M2P table is used to efficiently map a machine address it needs to operate on back to a physical address that the OS core code can understand. I''m not exactly sure where it''s used in the code, but I''d guess that page fault / swapping code would need to deal with these conversions.> when a VM boot with memsize=512M ,its p2m maybe only 64M or something > ,and when guest application request the memory,its virtual memory is > mapped ,and when the application write some data into that memory,there > is a page fault araised,and at that time guestOS update p2m and m2p and > its page table(say virtual-to-machine address) ,is it right? or how do > xen and guestOS deal with it?M2P table always contains entries for every machine frame which is currently in use on the host. The P2M mapping is fairly static during the life of the guest - as far as I can think of, it only gets changed by ballooning and page flipping (i.e. the network driver), so it all gets initialised when the domain starts and rarely changes. Neither the M2P nor the P2m mapping is produced on demand, unlike the way pages are typically demand faulted into an address space. Also: The M2P is machine global and the P2M is domain global, so stuff doesn''t really happen to those on a per-task basis at all. HTH, Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel