xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* virtual bios question
@ 2011-05-26  5:16 confucius
       [not found] ` <BANLkTi=D5XxaQg9synH6Tdw87HJVSFpt5w@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: confucius @ 2011-05-26  5:16 UTC (permalink / raw)
  To: xen-devel

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: virtual bios question
       [not found]   ` <BLU163-ds182456EA0AC53A1306D2DFDE770@phx.gbl>
@ 2011-05-26 13:15     ` Daniel Castro
  2011-05-26 13:27       ` Ian Campbell
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Castro @ 2011-05-26 13:15 UTC (permalink / raw)
  To: henanwxr; +Cc: 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                         |
+-------------------------------------+

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: virtual bios question
  2011-05-26 13:15     ` Daniel Castro
@ 2011-05-26 13:27       ` Ian Campbell
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2011-05-26 13:27 UTC (permalink / raw)
  To: Daniel Castro; +Cc: henanwxr, xen-devel@lists.xensource.com

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-26 13:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-26  5:16 virtual bios question confucius
     [not found] ` <BANLkTi=D5XxaQg9synH6Tdw87HJVSFpt5w@mail.gmail.com>
     [not found]   ` <BLU163-ds182456EA0AC53A1306D2DFDE770@phx.gbl>
2011-05-26 13:15     ` Daniel Castro
2011-05-26 13:27       ` Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).