From: "Fiona Ebner" <f.ebner@proxmox.com>
To: Gerd Hoffmann <kraxel@redhat.com>, devel@edk2.groups.io
Cc: Jordan Justen <jordan.l.justen@intel.com>,
Pawel Polawski <ppolawsk@redhat.com>,
Jiewen Yao <jiewen.yao@intel.com>,
Oliver Steffen <osteffen@redhat.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Thomas Lamprecht <t.lamprecht@proxmox.com>
Subject: Re: [PATCH v2 3/4] OvmfPkg/PlatformInitLib: dynamic mmio window size
Date: Tue, 16 May 2023 16:00:55 +0200 [thread overview]
Message-ID: <f073645f-7078-70b3-474c-962977104965@proxmox.com> (raw)
In-Reply-To: <20221004134728.55499-4-kraxel@redhat.com>
Am 04.10.22 um 15:47 schrieb Gerd Hoffmann:
> In case we have a reliable PhysMemAddressWidth use that to dynamically
> size the 64bit address window. Allocate 1/8 of the physical address
> space and place the window at the upper end of the address space.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Hi,
a user recently reported that their Ubuntu 18.04 VM failed to boot after
upgrading to our package based on edk2-stable202302 [0]. While the guest
does reach GRUB, the disk attached via virtio-scsi-pci could not be
found anymore. The user also reported that after changing the bus to
pvscsi, the VM booted again, but the virtual NIC attached via
virtio-net-pci did not work. Changing to e1000 made that work too.
I was able to reproduce the issue (QEMU command line below[1]) and
tracked it down to this patch. I verified that it is still an issue with
current QEMU master and edk2 master, i.e. cafb4f3f36 ("UefiPayloadPkg:
Fix boot shell issue for universal UEFI payload").
The issue happens with -cpu host, but not with -cpu kvm64. My host CPU
is a AMD Ryzen Threadripper 2920X.
"Reverting" with (this was the quickest way)
> diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
> index acf90b4e93..8563d7aedb 100644
> --- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c
> +++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
> @@ -855,7 +855,7 @@ PlatformAddressWidthInitialization (
> PlatformAddressWidthFromCpuid (PlatformInfoHob, TRUE);
> if (PlatformInfoHob->PhysMemAddressWidth != 0) {
> // physical address width is known
> - PlatformDynamicMmioWindow (PlatformInfoHob);
> + //PlatformDynamicMmioWindow (PlatformInfoHob);^M
> return;
> }
allows the disk to be detected again.
The kernel within the VM is
for the user: 4.15.0-210-generic #221-Ubuntu
for me: 4.15.0-211-generic #222-Ubuntu
Happy to provide more information and relevant parts of debug logs.
Best Regards,
Fiona
[0]: https://forum.proxmox.com/threads/127410/#post-557209
[1]: > ./qemu-system-x86_64 \
> -accel 'kvm' \
> -chardev 'socket,id=qmp,path=/var/run/qemu-server/113.qmp,server=on,wait=off' \
> -mon 'chardev=qmp,mode=control' \
> -pidfile /var/run/qemu-server/113.pid \
> -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/root/OVMF_CODE.fd' \
> -drive 'if=pflash,unit=1,id=drive-efidisk0,format=raw,file=/dev/pve/vm-113-disk-2,size=540672' \
> -nodefaults \
> -vnc 'unix:/var/run/qemu-server/113.vnc,password=on' \
> -cpu host \
> -m 10240 \
> -device 'pci-bridge,id=pci.3,chassis_nr=3,bus=pci.0,addr=0x5' \
> -device 'vmware-svga,id=vga,bus=pci.0,addr=0x2' \
> -device 'virtio-scsi-pci,id=virtioscsi0,bus=pci.3,addr=0x1' \
> -drive 'file=/dev/pve/vm-113-disk-1,if=none,id=drive-scsi0,format=raw,cache=none,aio=io_uring,detect-zeroes=on' \
> -device 'scsi-hd,bus=virtioscsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' \
> -serial pty \
> -S \
> -machine 'type=pc'
next prev parent reply other threads:[~2023-05-16 14:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-04 13:47 [PATCH v2 0/4] OvmfPkg: make better use of physical address space Gerd Hoffmann
2022-10-04 13:47 ` [PATCH v2 1/4] OvmfPkg/PlatformInitLib: qemu cpuid physbits detection Gerd Hoffmann
2022-10-04 13:47 ` [PATCH v2 2/4] OvmfPkg/PlatformInitLib: detect physical address space Gerd Hoffmann
2023-03-16 13:58 ` f.ebner
2023-03-16 14:37 ` Gerd Hoffmann
2023-03-17 11:34 ` [edk2-devel] " Fiona Ebner
2023-03-17 14:01 ` Gerd Hoffmann
2023-03-20 14:20 ` Fiona Ebner
2023-03-20 15:58 ` Gerd Hoffmann
2022-10-04 13:47 ` [PATCH v2 3/4] OvmfPkg/PlatformInitLib: dynamic mmio window size Gerd Hoffmann
2023-03-15 8:54 ` [edk2-devel] " joeyli
2023-03-15 9:28 ` Gerd Hoffmann
2023-05-16 14:00 ` Fiona Ebner [this message]
2023-05-17 5:59 ` Gerd Hoffmann
2023-05-17 13:38 ` Fiona Ebner
2023-05-22 11:12 ` Gerd Hoffmann
2023-05-22 13:36 ` Fiona Ebner
2022-10-04 13:47 ` [PATCH v2 4/4] OvmfPkg/PciHotPlugInitDxe: reserve more mmio space Gerd Hoffmann
2022-10-04 15:57 ` Laszlo Ersek
2022-10-05 5:01 ` Gerd Hoffmann
2022-10-06 8:50 ` Laszlo Ersek
2022-10-07 21:49 ` [edk2-devel] [PATCH v2 0/4] OvmfPkg: make better use of physical address space Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f073645f-7078-70b3-474c-962977104965@proxmox.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox