qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Question about qemu firmware configuration (fw_cfg) dev


From: Alexander Graf
Subject: Re: [Qemu-devel] Question about qemu firmware configuration (fw_cfg) device
Date: Wed, 21 Jul 2010 09:27:16 +0200

On 21.07.2010, at 00:22, Blue Swirl wrote:

> On Sat, Jul 17, 2010 at 9:50 AM, Richard W.M. Jones <address@hidden> wrote:
>> I'm trying to speed up the process of loading kernel and initrd.
>> 
>> I found that the main loop which loads these into qemu memory does it
>> via executing in the guest:
>> 
>>  rep insb (%dx),%es:(%edi)
>> 
>> In other words, reading it byte-at-a-time from an emulated IO port.
>> This is very slow[1] when your initrd is > 100MB like mine is.
>> 
>> Questions:
>> 
>> Is fw_cfg a purely qemu concept?  Does this BIOS firmware port
>> 0x510-0x511 exist in real hardware?
>> 
>> I understand from the git logs that fw_cfg was added because the old
>> way was to load kernel & initrd into RAM directly, but this didn't
>> work because SeaBIOS would clear the RAM, clobbering kernel & initrd.
>> Could we change to loading these directly into RAM, and instead
>> provide some indication to SeaBIOS so it doesn't clobber the RAM?  I'm
>> quite prepared to do the work, just wondering if there's something
>> else I'm not getting about this.
> 
> The entire discussion after this very first message seems to focus on
> the DMA method. But is it so hard to fix SeaBIOS from clobbering RAM?

It was basically introduced to have a clean way of actually loading the blobs. 
This is a lot more flexible than trying to make sure every firmware out there 
doesn't accidently overwrite random ram regions.

The conclusion on the phone call was basically to try and look into optimizing 
the general rep ins case for now. That should also benefit others and isn't 
tightly coupled with this exact problem.


Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]