Hi, when user create the virtual machine, then: which code execute firstly, hvmloaer or qemu-dm?I have traced the codes flow and found qemu-dm run before hvmloader,right? And virtual bios code are both in hvmloader and qemu-dm, but I think it should be only one of virtual bios will be used to initialize the virutal device in qemu-dm.I find at the end of hvmloader it will jmp to 0xffff0, that is the bios entry,so I think the virtual bios in hvmloader will function. But how qemu-dm ingore the execution of its virual bios inside? Any one help me? Thanks. -- View this message in context: http://xen.1045712.n5.nabble.com/virtual-bios-question-tp4427579p4427579.html Sent from the Xen - Dev mailing list archive at Nabble.com. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
CC the mail List. On Thu, May 26, 2011 at 9:18 PM, henanwxr <henanwxr@hotmail.com> wrote:> Hi, thank you for your reply, but I am not very clear. Can you explain in detail? > Do you mean qemu-dm don''t execute the virtual bios? > But in my opinion, a plain qemu emulator will execute the virtual bios in its initialization, when qemu-dm work with hvmloader, how does qemu-dm ignore the execution of its virtual bios?The Virtual BIOS is not something you execute per se. qemu-dm is the executable, it loads the memory with a binary blob, that binary blob is hvmloader (hvmloader has more functions, this is one), inside hvmloader is another binary blob that is rombios, the virtual BIOS. After all this is loaded to the memory the balloon driver reserved the bootloader quicks in using the BIOS and the emulated ide disk provided by qemu but interfaced through the virtual BIOS, the bootloader process starts, it reads the boot sector 0 from the emulated disk and jumps to the bootstrap just like a regular boot sequence. The loading HVM Kernel sees memory as if it were the only system running on the machine because it sees memory starting from 0, the BIOS is located at 0x00000400. When in fact it resides somewhere in main memory (not starting from 0) that is controlled by the dom0. Some of the boot steps are missing. Daniel> > > > -------------------------------------------------- > From: "Daniel Castro" <evil.dani@gmail.com> > Sent: Thursday, May 26, 2011 5:26 PM > To: "confucius" <henanwxr@hotmail.com> > Subject: Re: [Xen-devel] virtual bios question > >> As I understand it, please se below: >> >> >> >> On Thu, May 26, 2011 at 2:16 PM, confucius <henanwxr@hotmail.com> wrote: >>> Hi, when user create the virtual machine, then: >>> which code execute firstly, hvmloaer or qemu-dm?I have traced the codes flow >>> and found qemu-dm run before hvmloader,right? >>> >>> And virtual bios code are both in hvmloader and qemu-dm, but I think it >>> should be only one of virtual bios >>> will be used to initialize the virutal device in qemu-dm.I find at the end >>> of hvmloader it will jmp to 0xffff0, that is the bios entry,so I think the >>> virtual bios in hvmloader will function. But how qemu-dm ingore the >>> execution of its virual bios inside? >>> >>> Any one help me? Thanks. >> >> When the domain builder is called, it created the qemu-dm in >> userspace, the baloon driver for memory is called to reserve the >> necesary memory. Qemu uses hvmloader to create the necesary >> information for a machine to boot (hvmloader is the payload for qemu), >> the BIOS is included as a binary blob inside hvmloader. So for >> example, the BIOS binary image will me found in the expected memory >> address as well as ACPI tables and all the usual things that a >> baremetal machine would find. >> Both hvmloader and qemu work in concert to make the BIOS work. then >> the BIOS calls the bootloader in the primary IDE device provided by >> qemu, this can be changed with configurations options. >> >> Hope this helps. >> >> Daniel >>> >>> >>> -- >>> View this message in context: http://xen.1045712.n5.nabble.com/virtual-bios-question-tp4427579p4427579.html >>> Sent from the Xen - Dev mailing list archive at Nabble.com. >>> >>> _______________________________________________ >>> Xen-devel mailing list >>> Xen-devel@lists.xensource.com >>> http://lists.xensource.com/xen-devel >>> >> >> >> >> -- >> +-=====---------------------------+ >> | +---------------------------------+ | This space intentionally blank >> for notetaking. >> | | | Daniel Castro, | >> | | | Consultant/Programmer.| >> | | | U Andes | >> +-------------------------------------+ >>-- +-=====---------------------------+ | +---------------------------------+ | This space intentionally blank for notetaking. | | | Daniel Castro, | | | | Consultant/Programmer.| | | | U Andes | +-------------------------------------+ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Thu, 2011-05-26 at 14:15 +0100, Daniel Castro wrote:> CC the mail List. > > > > On Thu, May 26, 2011 at 9:18 PM, henanwxr <henanwxr@hotmail.com> wrote: > > Hi, thank you for your reply, but I am not very clear. Can you explain in detail? > > Do you mean qemu-dm don''t execute the virtual bios? > > But in my opinion, a plain qemu emulator will execute the virtual bios in its initialization, when qemu-dm work with hvmloader, how does qemu-dm ignore the execution of its virtual bios? > > The Virtual BIOS is not something you execute per se. qemu-dm is the > executable, it loads the memory with a binary blob,strictly speaking it is the domain builder which loads things into memory, qemu-dm doesn''t have anything to do with it. In a xen system qemu only provides emulation for devices, qemu''s code execution functionality is unused in this context.> that binary blob > is hvmloader (hvmloader has more functions, this is one), inside > hvmloader is another binary blob that is rombios, the virtual BIOS. > After all this is loaded to the memory the balloon driver reserved the > bootloader quicks in using the BIOS and the emulated ide disk provided > by qemu but interfaced through the virtual BIOS, the bootloader > process starts, it reads the boot sector 0 from the emulated disk and > jumps to the bootstrap just like a regular boot sequence. The loading > HVM Kernel sees memory as if it were the only system running on the > machine because it sees memory starting from 0, the BIOS is located at > 0x00000400. When in fact it resides somewhere in main memory (not > starting from 0) that is controlled by the dom0. > > Some of the boot steps are missing. > > Daniel > > > > > > > > > -------------------------------------------------- > > From: "Daniel Castro" <evil.dani@gmail.com> > > Sent: Thursday, May 26, 2011 5:26 PM > > To: "confucius" <henanwxr@hotmail.com> > > Subject: Re: [Xen-devel] virtual bios question > > > >> As I understand it, please se below: > >> > >> > >> > >> On Thu, May 26, 2011 at 2:16 PM, confucius <henanwxr@hotmail.com> wrote: > >>> Hi, when user create the virtual machine, then: > >>> which code execute firstly, hvmloaer or qemu-dm?I have traced the codes flow > >>> and found qemu-dm run before hvmloader,right? > >>> > >>> And virtual bios code are both in hvmloader and qemu-dm, but I think it > >>> should be only one of virtual bios > >>> will be used to initialize the virutal device in qemu-dm.I find at the end > >>> of hvmloader it will jmp to 0xffff0, that is the bios entry,so I think the > >>> virtual bios in hvmloader will function. But how qemu-dm ingore the > >>> execution of its virual bios inside? > >>> > >>> Any one help me? Thanks. > >> > >> When the domain builder is called, it created the qemu-dm in > >> userspace, the baloon driver for memory is called to reserve the > >> necesary memory. Qemu uses hvmloader to create the necesary > >> information for a machine to boot (hvmloader is the payload for qemu), > >> the BIOS is included as a binary blob inside hvmloader. So for > >> example, the BIOS binary image will me found in the expected memory > >> address as well as ACPI tables and all the usual things that a > >> baremetal machine would find. > >> Both hvmloader and qemu work in concert to make the BIOS work. then > >> the BIOS calls the bootloader in the primary IDE device provided by > >> qemu, this can be changed with configurations options. > >> > >> Hope this helps. > >> > >> Daniel > >>> > >>> > >>> -- > >>> View this message in context: http://xen.1045712.n5.nabble.com/virtual-bios-question-tp4427579p4427579.html > >>> Sent from the Xen - Dev mailing list archive at Nabble.com. > >>> > >>> _______________________________________________ > >>> Xen-devel mailing list > >>> Xen-devel@lists.xensource.com > >>> http://lists.xensource.com/xen-devel > >>> > >> > >> > >> > >> -- > >> +-=====---------------------------+ > >> | +---------------------------------+ | This space intentionally blank > >> for notetaking. > >> | | | Daniel Castro, | > >> | | | Consultant/Programmer.| > >> | | | U Andes | > >> +-------------------------------------+ > >> > > > > -- > +-=====---------------------------+ > | +---------------------------------+ | This space intentionally blank > for notetaking. > | | | Daniel Castro, | > | | | Consultant/Programmer.| > | | | U Andes | > +-------------------------------------+ > > _______________________________________________ > 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