qemu-devel
[Top][All Lists]
Advanced

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

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


From: Jordan Justen
Subject: Re: [Qemu-devel] [PATCH v7 0/2] PC system flash support
Date: Sat, 5 Nov 2011 14:30:54 -0700

Cc: qemu-devel

On Fri, Nov 4, 2011 at 22:37, Zhi Yong Wu <address@hidden> wrote:
> On Sat, Nov 5, 2011 at 12:11 AM, Jordan Justen <address@hidden> wrote:
>> On Fri, Nov 4, 2011 at 04:34, Zhi Yong Wu <address@hidden> wrote:
>>> BTW: what is the relationship between -bios and -pflash?
>>
>> Previously the QEMU/KVM PC system had no pflash support.  You could
>> specify a pflash drive, but it would not appear in the VM.
>>
>> Also, previously the -bios flag would cause the specified binary to be
>> loaded by QEMU, and then it was put into a memory region to be used
>> for the firmware.
>>
>> After this change, the pflash drive is used for firmware.  So, it
> This pflash drive is created with -pflash option, right?

-pflash can be used, but I think it is just a short cut.

-pflash /path/to/file
is similar to:
-drive if=pflash,file=/path/to/file

And, after this change,
-bios /path/to/file
is similar to:
-drive if=pflash,file=/path/to/file,readonly=on

>> should be able to support qcow2, since qemu drives support the
>> different formats.

I confirmed that you can use a qcow2 image with -bios after this change.

>> For backward compatibility, this change makes the -bios parameter be
>> another way to specify the pflash drive.  If -bios is used, then a
>> read-only pflash drive is created.
> Sorry, i don't fully understand this. How about -bios and -pflash are
> both specified.

In this case the -pflash will be used, and -bios will be ignored.  I
use -bios to create a pflash drive only if no pflash drive exists
already.

I think this should be okay, since -pflash has no use in the QEMU PC
system before this patch, so it is unlikely that both -pflash and
-bios will be used previously.

>>> If your patch is applied to my source tree, can you know how to use -pflash?
> Sorry, i made a mistake. I wanted to ask you how to use -pflash if
> your patch is not applied.

I don't think you can use pflash in a PC system when my patch is not
applied.  I think without the patch qemu will create the pflash drive
internally, but it will not be hooked to a device that the emulated PC
system can see.

I attached a log of me interacting with the pflash device under the
EFI shell on OVMF *with* the patch applied.

Thanks,

-Jordan

Attachment: ovmf-flash-example-annotated.txt
Description: Text document


reply via email to

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