From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx.groups.io with SMTP id smtpd.web08.21576.1628772082122919517 for ; Thu, 12 Aug 2021 05:41:22 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=softfail (domain: linux.com, ip: 211.29.132.53, mailfrom: chris.willing@linux.com) Received: from d8.hgw.net.au (pa49-197-140-170.pa.qld.optusnet.com.au [49.197.140.170]) (Authenticated sender: chris.willing@optusnet.com.au) by mail107.syd.optusnet.com.au (Postfix) with ESMTPSA id 292AE11441EE; Thu, 12 Aug 2021 22:41:17 +1000 (AEST) Reply-To: chris.willing@linux.com Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg PlatformBootManagerLib: Move TryRunningQemuKernel() To: Ard Biesheuvel Cc: Gerd Hoffmann , edk2-devel-groups-io , James Bottomley , Ard Biesheuvel , Jiewen Yao References: <20210728020232.127332-1-chris.willing@linux.com> <1695D2E15A92C8E7.3876@groups.io> <62f9ffa0-786f-09dd-9546-c4c118fa2a17@linux.com> <1b544f28-b5b9-c08c-bab7-8c1f41778dce@linux.com> <5c85a3f963d1ab7d20e177db9a07a73e82a0eed0.camel@HansenPartnership.com> <7dc3b9d2-5ebb-c261-46b4-658dcbbfd0f4@linux.com> <8286f815812caccbffaa3696f5e884a62ec0a046.camel@HansenPartnership.com> <20210811061223.prihfxnufka6gzxp@sirius.home.kraxel.org> <5eb58219-758c-e12b-8bd3-5d646dba72bc@linux.com> From: "Christoph Willing" Message-ID: <9972a9a6-b34e-7735-d4a7-5ff7c1be8fe0@linux.com> Date: Thu, 12 Aug 2021 22:41:17 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=Tu+Yewfh c=1 sm=1 tr=0 a=jHkrTDijwrxVdaLaom9wOA==:117 a=jHkrTDijwrxVdaLaom9wOA==:17 a=IkcTkHD0fZMA:10 a=pGLkceISAAAA:8 a=zx4_TWOlV_OMB8Ii8gUA:9 a=QEXdDO2ut3YA:10 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 11/8/21 8:30 pm, Ard Biesheuvel wrote: > On Wed, 11 Aug 2021 at 11:55, Christoph Willing > <475.chris.willing@gmail.com> wrote: >> >> On 11/8/21 4:12 pm, Gerd Hoffmann wrote: >>> Hi, >>> >>>> I amended my script to have: >>>> >>>> -drive if=none,id=sd00,file=disk.img,format=raw \ >>>> -device virtio-scsi-pci,id=scsi \ >>>> -device scsi-hd,bus=scsi.0,drive=sd00 \ >>> >>> That switches storage from ide to virtio-scsi. >>> >>> Which is a good idea from the performance point of view. Will obviously >>> also workaround ide problems. But might fail now due to virtio-scsi >>> driver not being part of your initrd. >>> >> >> Thank you James & Gerd, >> >> Your suggestions & comments led me to reconsider the contents of the >> initrd and the problem is now fixed. >> >> I had been using an initrd that worked perfectly in a non-UEFI boot and >> half worked with UEFI boot (the working half being when code was >> patched). However when I generated a completely new initrd after >> installing a new system in UEFI mode, I could see many virtio modules >> being added which were not part of the old initrd I had been using. >> Booting with the new initrd works perfectly in all boot modes using >> OVMF files created without any code patching. >> >> Is there a particular procedure to withdraw my patch request, or does it >> die a quiet death by being ignored now? >> > > Glad to hear that the mystery is solved now. > > As for the patch, we will just disregard it - no need for any other > action on your part. > Hi all, I just wanted to add some clarification about why the problem is fixed. It not really just about adding virtio* modules to the initrd. That was only needed because I changed the drive to use a virtio-scsi-pci device as James had suggested. While that all worked fine, probably with better performance (as Gerd mentioned) it was still unsatisfying that I couldn't make the plain ide work. It turns out that the ide interface can work without changes to the initrd but invocation requires separate -drive and -device options, somewhat like James' scsi version, namely: -device ahci,id=ahci \ -device ide-hd,drive=ide0,bus=ahci.0 \ -drive if=none,id=ide0,file=disk.img,format=raw,cache=none,index=0,media=disk \ instead of my original shortcut version: -drive file=disk.img,format=raw,cache=none,index=0,media=disk \ I'll probably stick with the better performing scsi version from now on although it's still interesting that the shortcut version works without UEFI but fails with UEFI. chris