Bug 1686552 - allow backing of pflash via -blockdev
Summary: allow backing of pflash via -blockdev
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: ---
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: 8.0
Assignee: Markus Armbruster
QA Contact: CongLi
URL:
Whiteboard:
: 1717155 (view as bug list)
Depends On: 1546084 1624009
Blocks: 1605127
TreeView+ depends on / blocked
 
Reported: 2019-03-07 16:59 UTC by Ademar Reis
Modified: 2019-11-06 07:13 UTC (History)
19 users (show)

Fixed In Version: qemu-kvm-4.0.0-1.module+el8.1.0+3225+a8268fde
Doc Type: Enhancement
Doc Text:
Clone Of: 1624009
Environment:
Last Closed: 2019-11-06 07:13:36 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:3723 0 None None None 2019-11-06 07:13:56 UTC

Description Ademar Reis 2019-03-07 16:59:54 UTC
+++ This bug was initially created as a clone of Bug #1624009 +++

Description of problem:
The 'pflash' device is instantiated by definig the -drive which is backing it. To allow snapshotting it along with the disks it would be beneficial to allow using -blockdev for it so that the same code can be reused.

--- Additional comment from Markus Armbruster on 2018-09-26 05:03:48 EDT ---

We configure pflash devices with -drive if=pflash,...  Peter is looking for a way to configure them with -blockdev and -device.  I'll look into it.

Comment 3 Markus Armbruster 2019-03-20 15:43:56 UTC
Fixed in upstream merge commit eda1df0345f5a1e337e30367124dcb0e802bdfde, will be in QEMU v4.0.

The fix supersedes the old way of configuring OVMF

    -drive if=pflash,format=raw,unit=0,readonly,file=/usr/share/edk2/ovmf/OVMF_CODE.fd \
    -drive if=pflash,format=raw,unit=1,file=copy-of-OVMF_VARS.fd

by

    -blockdev node-name=pflash0,driver=file,read-only=on,filename=/usr/share/edk2/ovmf/OVMF_CODE.fd \
    -blockdev node-name=pflash1,driver=file,filename=copy-of-OVMF_VARS.fd \
    -machine pflash0=pflash0,pflash1=pflash1

Comment 4 CongLi 2019-05-09 06:55:43 UTC
Verified on qemu-kvm-4.0.0-0.module+el8.1.0+3169+3c501422.x86_64:

plash device works well with blockdev.
    -blockdev node-name=pflash0,read-only=on,driver=file,filename=/usr/share/OVMF/OVMF_CODE.secboot.fd \
    -blockdev node-name=pflash1,driver=file,filename=/home/kvm_autotest_root/images/rhel810-64-virtio-scsi.qcow2.fd \
    -machine pflash0=pflash0,pflash1=pflash1  \

Comment 10 Danilo de Paula 2019-05-28 20:54:50 UTC
Dropping NEED_INFO

Comment 11 CongLi 2019-05-29 02:09:38 UTC
Based on comment 4, set bug to 'VERIFIED'.

Thanks.

Comment 12 CongLi 2019-06-05 00:30:08 UTC
*** Bug 1717155 has been marked as a duplicate of this bug. ***

Comment 13 Michael 2019-07-21 10:01:30 UTC
Hi Laszlo:

It looks that the slow train does not support Property '.pflash0'. 

/usr/libexec/qemu-kvm -M q35 -cpu SandyBridge -enable-kvm -m 4G -smp 4 -nodefaults \
-global driver=cfi.pflash01,property=secure,value=on \
-machine pflash0=pflash0,pflash1=pflash1 \
-blockdev node-name=pflash0,read-only=on,driver=file,filename=/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd \
-blockdev node-name=pflash1,read-only=off,driver=file,filename=/tmp/new-edk2-version/OVMF_VARS.fd \
... ...

qemu-kvm: Property '.pflash0' not found


Version:
qemu-kvm-2.12.0-81.module+el8.1.0+3619+dfe1ae01.x86_64
edk2-ovmf-20190308git89910a39dcfd-5.el8.noarch



Thank you for your help.

Comment 14 Markus Armbruster 2019-07-22 04:55:25 UTC
The slow train has not gotten this feature.  If it is needed there, ask for it by cloning this BZ for product "Red Hat Enterprise Linux 8".

Comment 15 Ademar Reis 2019-07-30 17:10:40 UTC
(In reply to Markus Armbruster from comment #14)
> The slow train has not gotten this feature.  If it is needed there, ask for
> it by cloning this BZ for product "Red Hat Enterprise Linux 8".

It's not needed. We don't plan to support -blockdev in RHEL8 (slow train) until a potential rebase of major virt components (qemu, libvirt, etc).

Comment 17 errata-xmlrpc 2019-11-06 07:13:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:3723


Note You need to log in before you can comment on or make changes to this bug.