Bug 1948442

Summary: [Hyper-V][RHEL8.4]On Hyper-V Host set gen1 MAX resolution > 3840x4320, GUI start failed, sometimes get kernel panic
Product: Red Hat Enterprise Linux 8 Reporter: HuijingHei <hhei>
Component: kernelAssignee: Mohammed Gamal <mmorsy>
kernel sub component: Hyper-V QA Contact: xxiong
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: high CC: ajb, decui, eterrell, hhei, huzhao, litian, mmorsy, ssengar, toracat, vkuznets, weh, xuli, xxiong, yacao, yuxisun
Version: 8.4Keywords: Triaged
Target Milestone: beta   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kernel-4.18.0-402.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1955389 (view as bug list) Environment:
Last Closed: 2022-11-08 10:12:22 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: 1955389    

Description HuijingHei 2021-04-12 07:55:11 UTC
Description of problem:
On Hyper-V host, set gen1 VM MAX resolution > 3840x4320 (like 7680x4320), actually the supported maximum is 3840x4320, then start VM, sometimes gnome start failed(can access VM via ssh), sometimes VM start failed with kernel panic. Gen2 VM does not have this problem, it can support 7680x4320
This is to track https://bugzilla.redhat.com/show_bug.cgi?id=1941841#c62

Version-Release number of selected components (if applicable):
Host: Hyper-V 2019
Guest: gen1 VM with 4.18.0-302.el8.x86_64

RHEL Version:
RHEL-8.4

How reproducible:
100%

Steps to Reproduce:
1. Power off gen1 VM, set resolution to 7680x4320 on Host with powershell command, actually gen1 does not support such big resolution
c:\> Set-VMVideo RHEL-8.4-GEN1-B -HorizontalResolution 7680 -VerticalResolution 4320 -ResolutionType Maximum

2. Start VM with "video=hyperv_fb:1920x1080"

Actual results:
1) GUI starts failed with logs
[   16.993689] hv_vmbus: registering driver hyperv_fb
[   17.009207] hyperv_fb: Synthvid Version major 3, minor 5
[   17.009249] hyperv_fb: Screen resolution: 1920x1080, Color depth: 32
[   17.009253] hyperv_fb: Unable to allocate enough contiguous physical memory on Gen 1 VM. Using MMIO instead.
[   17.009254] hyperv_fb: Resource not available or (0x4000000 < 0x8000000)
[   17.009254] hyperv_fb: No memory for framebuffer
[   17.009576] hv_vmbus: probe failed for device 5620e0c7-8062-4dce-aeb7-520c7ef76171 (-12)
[   17.009579] hyperv_fb: probe of 5620e0c7-8062-4dce-aeb7-520c7ef76171 failed with error -12

2) Somtimes VM starts with kernel panic

Expected results:
VM can start without error

Comment 1 Dexuan Cui 2021-04-12 08:50:33 UTC
This bug exists in the latest mainline kernel.

Comment 10 xxiong 2022-03-16 01:49:41 UTC
Issue still occurs on kernel: 4.18.0-369.el8.x86_64

[root@vm-197-97 ~]# dmesg | grep hyperv_fb
[    6.671212] hv_vmbus: registering driver hyperv_fb
[    6.672327] hyperv_fb: Synthvid Version major 3, minor 5
[    6.672356] hyperv_fb: Screen resolution: 1024x768, Color depth: 32, Frame buffer size: 134217728
[    6.672360] hyperv_fb: Unable to allocate enough contiguous physical memory on Gen 1 VM. Using MMIO instead.
[    6.672360] hyperv_fb: Resource not available or (0x4000000 < 0x8000000)
[    6.674032] hyperv_fb: No memory for framebuffer
[    6.677325] hyperv_fb: probe of 5620e0c7-8062-4dce-aeb7-520c7ef76171 failed with error -12
[root@vm-197-97 ~]# uname -r
4.18.0-369.el8.x86_64
[root@vm-197-97 ~]#

Comment 15 xuli 2022-05-27 08:54:34 UTC
(In reply to Saurabh Sengar from comment #11)
> Please try the fix, upstreamed in fbdev-next:
> https://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git/
> commit/?h=for-next&id=c4b4d7047f16a8d138ce76da65faefb7165736f2

Hi Saurabh,

We have tested the above patch, it could fix this issue.

Both Gen 1 and Gen 2 VM can start with GUI successfully when set MAX resolution > 3840x4320, e.g. change maximum resolution by “Set-VMVideo RHEL-8.7.0-x86_64-gen1-xx -HorizontalResolution 7680 -VerticalResolution 4320 -ResolutionType Maximum”.

Thank you so much.
Best Regards,
Xuemin

Comment 21 xxiong 2022-06-21 01:35:03 UTC
Checked with compose RHEL-8.7.0-20220619.0-x86_64-gen1, now this issue not appear, and GUI login display well.

PS C:\WINDOWS\system32> Set-VMVideo RHEL-8.7.0-20220619.0-x86_64-gen1-1948442-A -HorizontalResolution 7680 -VerticalResolution 4320 -ResolutionType Maximum

[root@vm-198-218 ~]# dmesg | grep -i error
[root@vm-198-218 ~]# cat /etc/default/grub | grep video
GRUB_CMDLINE_LINUX="crashkernel=auto resume=/dev/mapper/rhel_vm--198--218-swap rd.lvm.lv=rhel_vm-198-218/root rd.lvm.lv=rhel_vm-198-218/swap rhgb quiet video=hyperv_fb:1920x1080"
[root@vm-198-218 ~]# uname -r
4.18.0-402.el8.x86_64
[root@vm-198-218 ~]# 
[root@vm-198-218 ~]# ls /var/crash/
[root@vm-198-218 ~]#

Comment 23 errata-xmlrpc 2022-11-08 10:12:22 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 (Moderate: kernel security, 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/RHSA-2022:7683