[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] virtual bios question

  • To: henanwxr <henanwxr@xxxxxxxxxxx>
  • From: Daniel Castro <evil.dani@xxxxxxxxx>
  • Date: Thu, 26 May 2011 22:15:34 +0900
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 26 May 2011 06:16:32 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=ahAid8YR5iKc1LCxxEg177y8x3oCxGUIy+kC8fIhcnm6StB856Y3FUWSDeF/rzUF13 7pHyAycM6410dXIHPeQfCNdPMMkgTmCqPyPln+03Mi624yBinHuH+910ONp+8zg6WoAE /Far4wdnatl8ldprbBw1LTH8dIUvfs65iNFGs=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

CC the mail List.

On Thu, May 26, 2011 at 9:18 PM, henanwxr <henanwxr@xxxxxxxxxxx> 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.


> --------------------------------------------------
> From: "Daniel Castro" <evil.dani@xxxxxxxxx>
> Sent: Thursday, May 26, 2011 5:26 PM
> To: "confucius" <henanwxr@xxxxxxxxxxx>
> 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@xxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxx
>>> 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



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.