Note: groups.io will be down for maintenance on Monday, September 26th, starting at 9AM Pacific Time (4PM Monday September 26, 2022 UTC), for approximately one hour.
Problem with -kernel (-initrd, -append) qemu options
I cannot use -kernel, -initrd & -append options with qemu when using the OVMF files of any release from edk2-stable201808 onward, nor from the git master branch. The last release that has usable OVMF files is vUDK2018.
Normal booting (not using -kernel,... options) works fine, perhaps explaining why the problem has gone undetected so long (I guess my use case is not common). I have tested and confirmed to myself on various platforms; Slackware64-14.2, Slackware64-15.0, Clear Linux 34250 and Ubuntu 20.04. The different OSs all have different Qemu versions, namely 4.0.0, 6.0.0, 5.2.0 and 4.2.1 respectively. All OSs & qemu versions show the same problem.
I used git-bisect to find where the problem started and created a patch to resolve it. I opened a bugzilla case and have submitted the patch there.
I wonder whether an OvmfPkg maintainer could take a look at https://bugzilla.tianocore.org/show_bug.cgi?id=3504 and do whatever is needed to progress beyond there please? Hopefully just confirm and push :)