WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] virtual bios question

To: henanwxr <henanwxr@xxxxxxxxxxx>
Subject: Re: [Xen-devel] virtual bios question
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
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=1h6pks+wyuCsN5JWinLmGAUzLI/g4uL7Uka10JlO/KY=; b=TFdhwPXUJh6ZW3X/vAUuopDPikBqO98VAkEKV0fog2fEgKROQw61izvWDy9i/9jsDE RMhcw3ffpShvlyTW0ssV2f+XW+YNcMnUDoJRN8j+r4JXjncK3GlVuQBnKb+AIUWvjlfA KuXfNsEPP+p5ydjNXWfZJmwESiyH2pgnPNUrs=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <BLU163-ds182456EA0AC53A1306D2DFDE770@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1306386998899-4427579.post@xxxxxxxxxxxxx> <BANLkTi=D5XxaQg9synH6Tdw87HJVSFpt5w@xxxxxxxxxxxxxx> <BLU163-ds182456EA0AC53A1306D2DFDE770@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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.

Daniel

>
>
>
> --------------------------------------------------
> 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
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>