Bug 2087220

Summary: VNC display show "Guest has not initialized the display" when using ramfb + ovmf
Product: Red Hat Enterprise Linux 9 Reporter: Guo, Zhiyi <zhguo>
Component: edk2Assignee: Miroslav Rezanina <mrezanin>
Status: CLOSED ERRATA QA Contact: Guo, Zhiyi <zhguo>
Severity: high Docs Contact:
Priority: high    
Version: 9.1CC: alex.williamson, berrange, coli, eric.auger, jinzhao, juzhang, kkiwi, kraxel, lersek, osteffen, pbonzini, virt-maint
Target Milestone: rcKeywords: Regression, Triaged
Target Release: ---   
Hardware: x86_64   
OS: All   
Whiteboard:
Fixed In Version: edk2-20220221gitb24306f15d-2.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 09:56:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Guo, Zhiyi 2022-05-17 15:35:09 UTC
Description of problem:
VNC display show "Guest has not initialized the display" when using ramfb

Version-Release number of selected component (if applicable):
qemu-kvm-7.0.0-1.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot a rhel 9.1 vm with ramfb and ovmf and machine type pc-q35-rhel9.0.0

2.Connect remote-viewer to this vm and check the vnc display
3.

Actual results:
VNC display show "Guest has not initialized the display"

Expected results:
VNC display show vm content like grub, etc

Additional info:
Issue is gone if use machine type pc-q35-rhel8.5.0

This also impacts vfio display with ramfb=on

Comment 1 Gerd Hoffmann 2022-05-18 06:43:18 UTC
Driver is deactivated downstream in RHEL-9 ovmf:
  3c3aea0f3737 ArmVirtPkg: Remove QemuRamfbDxe display device driver (RHEL only)
  551cf28aeedc OvmfPkg: Remove QemuRamfbDxe display device driver (RHEL only)

Comment 7 Laszlo Ersek 2022-05-24 16:21:15 UTC
Why do we need ramfb support in edk2-ovmf? I've read through <https://bugzilla.redhat.com/show_bug.cgi?id=1679680> and <https://bugzilla.redhat.com/show_bug.cgi?id=1841068>, and I don't see the use case apart from AARCH64.

Comment 8 Laszlo Ersek 2022-05-24 16:28:37 UTC
The original removal was due to <https://bugzilla.redhat.com/show_bug.cgi?id=1967747#c2>:

> - OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf
>   (ramfb display device driver; only potentially needed for aarch64
>   Windows guests)

Commit 551cf28aeedc removed the driver from OvmfPkg DSC files, and I don't see why that's wrong.

Commit 3c3aea0f3737 removed the driver from ArmVirtPkg DSC files, and given that we don't support aarch64 Windows guests (which the commit message states, too), I don't see why that's wrong either.

The GPU assignment / vGPU case does not seem to apply to aarch64 guests at all, and on X64 guests, vga seems better <https://bugzilla.redhat.com/show_bug.cgi?id=1841068#c23>.

I had read <https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/> and <https://www.kraxel.org/blog/2019/02/ramfb-display-in-qemu/>, and I still don't have a clear understanding or statement in my mind as to why we need ramfb *in RHEL*. The original bug 1967747 was about stripping as many features as possible out of RHEL9. Thanks.

Comment 9 Gerd Hoffmann 2022-05-25 06:59:31 UTC
> The GPU assignment / vGPU case does not seem to apply to aarch64 guests at
> all, and on X64 guests, vga seems better
> <https://bugzilla.redhat.com/show_bug.cgi?id=1841068#c23>.

Boot display for gpu assignment is the only relevant use case indeed,
i.e. '-device vfio-pci,...,display=on,ramfb=on'

Advantage over '-device vfio-pci,...,display=on,ramfb=off -device VGA'
is that the ramfb setup tends to cause less problems on the guest side
because the guest will see only one pci display device, not two.

> The original bug 1967747 was about stripping as many
> features as possible out of RHEL9. Thanks.

Which surely makes sense for features not usable, but unfortunately
that was a bit too much.  Another case we have reverted is nvme support.
rhel qemu doesn't emulate nvme, I guess that's why it was dropped, but
pci-assigning nvme drives is a thing these days ...

Comment 10 Laszlo Ersek 2022-05-25 07:11:37 UTC
That explains why we want it in OvmfPkg, but the same idea doesn't seem to apply to ArmVirtPkg -- have we ever considered assignment with VFIO on aarch64?

Well I guess we can say we want "feature parity" between OvmfPkg and ArmVirtPkg here. I don't feel especially comfortable about it, *given* bug 1967747 (i.e., given the generic feature stripping in RHEL9). While we've certainly tested ramfb itself on aarch64, I don't think we've tested GPU assignment there. Anyway, no more questions, thanks.

Comment 11 Gerd Hoffmann 2022-05-25 07:24:46 UTC
(In reply to Laszlo Ersek from comment #10)
> That explains why we want it in OvmfPkg, but the same idea doesn't seem to
> apply to ArmVirtPkg -- have we ever considered assignment with VFIO on
> aarch64?

Correct, on aarch64 it is not required, we could leave it disabled
for armvirt.

I'd tend to keep ovmf and armvirt in sync for consistency reasons,
and from a support point of view I think it isn't that much of a
difference whenever we support the ramfb driver on one or two
architectures.

Klaus?  Any opinion here?

Comment 12 Gerd Hoffmann 2022-05-25 07:27:31 UTC
> That explains why we want it in OvmfPkg, but the same idea doesn't seem to
> apply to ArmVirtPkg -- have we ever considered assignment with VFIO on
> aarch64?

Alex, what is the state of affairs in terms of pci assignment on aarch64?

Should edk2 include drivers for pci-assigned hardware (nvme for example)
in the armvirt firmware builds?

Comment 15 Klaus Heinrich Kiwi 2022-05-25 15:05:19 UTC
(In reply to Gerd Hoffmann from comment #11)

> 
> Klaus?  Any opinion here?

I acknowledge the desire for 'parity' and consistency, but I also recognize that we're trying to have the slimmest, lowest 'surface-area' possible. So my recommendation is to disable everywhere where it is not explicitly supported/required.

 -Klaus

Comment 16 Daniel Berrangé 2022-05-25 15:40:38 UTC
(In reply to Klaus Heinrich Kiwi from comment #15)
> (In reply to Gerd Hoffmann from comment #11)
> 
> > 
> > Klaus?  Any opinion here?
> 
> I acknowledge the desire for 'parity' and consistency, but I also recognize
> that we're trying to have the slimmest, lowest 'surface-area' possible. So
> my recommendation is to disable everywhere where it is not explicitly
> supported/required.

Every time we intentionally create a difference between architectures, it has a negative ripple effect through the application stack, QE test plans and to our users. Intentionally compromising aarch64 targets by disabling features we enable on other targets further re-inforces the message that aarch64 is a secondclass citizen which is not a good thing.

WRT the intent to select a slim set of features for RHEL, this is an exercise we've aimed to apply at the package level, rather the architecture level. IOW, if we decide we don't want a particular feature make that decision for all QEMU arch targets, or none consistently.

Comment 18 Laszlo Ersek 2022-05-26 09:16:37 UTC
(In reply to Daniel Berrangé from comment #16)

> WRT the intent to select a slim set of features for RHEL, this is an
> exercise we've aimed to apply at the package level, rather the architecture
> level.

Good point, thanks! (With s/package/feature/, but anyway, you use "feature" below:)

> IOW, if we decide we don't want a particular feature make that
> decision for all QEMU arch targets, or none consistently.

Good summary, this is what I've been after. I think I didn't understand this when working on bug 1967747 with Phil. Thanks!

Comment 19 Yanan Fu 2022-05-27 05:40:05 UTC
QE bot(pre verify): Set 'Verified:Tested,SanityOnly' as gating/tier1 test pass.

Comment 22 Guo, Zhiyi 2022-06-17 00:23:02 UTC
Verify this issue against qemu-kvm-7.0.0-4.el9.x86_64 and edk2-ovmf-20220221gitb24306f15d-2.el9.noarch.

Boot rhel 9.1 VM with ramfb and check the vm screen in grub stage and desktop stage, graphic display normally.

Comment 24 errata-xmlrpc 2022-11-15 09:56:33 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 (edk2 bug fix and enhancement update), 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/RHEA-2022:7971