qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v8 0/2] PC system flash support


From: Jordan Justen
Subject: Re: [Qemu-devel] [PATCH v8 0/2] PC system flash support
Date: Tue, 29 Nov 2011 12:51:49 -0800

On Tue, Nov 29, 2011 at 01:38, Avi Kivity <address@hidden> wrote:
> On 11/29/2011 09:03 AM, Jordan Justen wrote:
>> On Mon, Nov 28, 2011 at 02:28, Avi Kivity <address@hidden> wrote:
>> > On 11/28/2011 04:26 AM, Jordan Justen wrote:
>> >> Enable flash emulation in a PC system using pflash_cfi01.
>> >
>> > The new memory layout should be made conditional on the machine type (-M
>> > pc-1.1 or later) to allow migration from/to pc-1.0 and earlier.
>> >
>> > Memory layout in this context are the names of memory ranges given to
>> > memory_region_init_ram(), sizes, and locations.  Also, the flash
>> > interface should not be there for older machines.
>>
>> Is this the right way to go about it?
>> 1. Create a new pc-sysfw qdev
>> 2. Use a flash property in pc_piix.c to selectively enable the flash
>>
>> Or, is there an easier or better way to say pc > pc-1.0?
>
> No idea, copying some qdev people.
>
>> How do I enable "migration from/to pc-1.0 and earlier"?  It seems like
>> some code will need to shuttle the data (rom <=> pflash).  Can you
>> point me an an example?
>
> It should be completely transparent, so long as you instantiate a ROM
> for <= pc-1.0 (say based on a property) and flash for >= pc-1.1.
>
> One way to verify is to to 'info qdev' and 'info mtree' with qemu-1.0
> and qemu-1.1 -M pc-1.0, and see that you get the same results.

I think this means that I cannot add a pc-sysfw qdev for pc-1.0.
(Even if the rom memory usage matches pc-1.0.)  Is that right?

If so, the plan I mentioned above would not work.  In the plan above,
a property of the pc-sysfw qdev would have determined if the old rom
method would be used, or the newer flash method would be used.

Thanks,

-Jordan



reply via email to

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