Bug 1654276

Summary: qemu-kvm: Should depend on the architecture-appropriate guest firmware
Product: Red Hat Enterprise Linux 8 Reporter: Andrea Bolognani <abologna>
Component: qemu-kvmAssignee: Danilo de Paula <ddepaula>
Status: CLOSED CURRENTRELEASE QA Contact: Chao Yang <chayang>
Severity: low Docs Contact:
Priority: medium    
Version: 8.0CC: abologna, chayang, ddepaula, juzhang, knoel, lersek, mrezanin, rbalakri, virt-maint, wchadwic
Target Milestone: rc   
Target Release: 8.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-2.12.0-52.module+el8+2617+8f1b8f17 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1660208 (view as bug list) Environment:
Last Closed: 2019-06-14 01:36:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1660208    

Description Andrea Bolognani 2018-11-28 11:38:04 UTC
The spec file for qemu-kvm currently contains

  %ifarch %{ix86} x86_64
  Requires: seabios-bin >= 1.10.2-1
  Requires: sgabios-bin
  %endif
  %ifnarch aarch64 s390x
  Requires: seavgabios-bin >= 1.10.2-1
  Requires: ipxe-roms-qemu >= 20170123-1
  %endif
  %ifarch %{power64}
  Requires: SLOF >= %{SLOF_gittagdate}-1.git%{SLOF_gittagcommit}
  %endif

This ensures SeaBIOS and SLOF are always installed along with QEMU
on the respective architectures, which is good; however, the same is
not true of OVMF (a fully-supported alternative to SeaBIOS for x86_64
guests) or AAVMF (the only firmware available for aarch64 guests). I
have no idea how guest firmware works on s390x, so I won't comment on
that.

We should introduce additional Requires: lines so that users wont't
have to worry about guest firmware at all, regardless of the
architecture they're using, and the user experience will be entirely
consistent.

Comment 3 Danilo de Paula 2018-12-14 17:09:30 UTC
Can you please clarify what's the firmware for each archtecture?

% ifarch x86_64
BuildRequires: edk2-ovmf
%endif

% ifarch aarch64
BuildRequires: edk2-aaarch64
%endif

Comment 4 Laszlo Ersek 2018-12-14 20:05:49 UTC
Hi Danilo,

that's right -- because we only support hardware virtualization, host and guest architecture should match. Therefore, on aarch64 hosts, edk2-aarch64 should be a dependency, and on x86_64 hosts, edk2-ovmf should be.

Please note that these should be runtime dependencies (i.e., "Requires", not "BuildRequires").

Thanks!

Comment 5 Danilo de Paula 2018-12-17 19:34:53 UTC
QA_ACK please

Comment 9 Danilo de Paula 2018-12-19 12:42:38 UTC
Fix is ready waiting for QA_ACK+ to be built.

Comment 13 Danilo de Paula 2019-01-04 12:41:18 UTC
Fix included in qemu-kvm-2.12.0-52.module+el8+2617+8f1b8f17

Comment 15 Chao Yang 2019-01-22 03:22:07 UTC
For aarch64:

# rpm -qp --requires qemu-kvm-core-2.12.0-57.module+el8+2683+02b3b955.aarch64.rpm 
/bin/sh
edk2-aarch64


For x86_64:

# rpm -qp --requires qemu-kvm-core-2.12.0-57.module+el8+2683+02b3b955.x86_64.rpm 
/bin/sh
edk2-ovmf

# rpm -ivh /home/qemu-kvm-core-2.12.0-57.module+el8+2683+02b3b955.x86_64.rpm 
error: Failed dependencies:
	edk2-ovmf is needed by qemu-kvm-core-15:2.12.0-57.module+el8+2683+02b3b955.x86_64

Currently, QE doesn't test aarch64 so setting VERIFIED

Comment 16 Chao Yang 2019-01-22 03:27:31 UTC
(In reply to Chao Yang from comment #15)
> For aarch64:
> 
> # rpm -qp --requires
> qemu-kvm-core-2.12.0-57.module+el8+2683+02b3b955.aarch64.rpm 
> /bin/sh
> edk2-aarch64
> 
> 
> For x86_64:
> 
> # rpm -qp --requires
> qemu-kvm-core-2.12.0-57.module+el8+2683+02b3b955.x86_64.rpm 
> /bin/sh
> edk2-ovmf
> 
> # rpm -ivh /home/qemu-kvm-core-2.12.0-57.module+el8+2683+02b3b955.x86_64.rpm 
> error: Failed dependencies:
> 	edk2-ovmf is needed by
> qemu-kvm-core-15:2.12.0-57.module+el8+2683+02b3b955.x86_64
> 

dnf module install virt:rhel worked fine which has qemu-kvm-core-15:2.12.0-57.module+el8+2683+02b3b955.x86_64 and edk2-ovmf-20180508gitee3198e672e2-8.el8.noarch installed correctly.

> Currently, QE doesn't test aarch64 so setting VERIFIED