From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web08.22266.1628775396503654592 for ; Thu, 12 Aug 2021 06:36:37 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-584-J-YTd-8qNy2yBwV7VZGe7Q-1; Thu, 12 Aug 2021 09:36:31 -0400 X-MC-Unique: J-YTd-8qNy2yBwV7VZGe7Q-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A71FA100A618; Thu, 12 Aug 2021 13:36:30 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.193.3]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 682D71017CE6; Thu, 12 Aug 2021 13:36:30 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B5E201800922; Thu, 12 Aug 2021 15:36:28 +0200 (CEST) Date: Thu, 12 Aug 2021 15:36:28 +0200 From: "Gerd Hoffmann" To: devel@edk2.groups.io, chris.willing@linux.com Cc: Ard Biesheuvel , James Bottomley , Ard Biesheuvel , Jiewen Yao Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg PlatformBootManagerLib: Move TryRunningQemuKernel() Message-ID: <20210812133628.2tk46qvou725435c@sirius.home.kraxel.org> References: <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> <9972a9a6-b34e-7735-d4a7-5ff7c1be8fe0@linux.com> MIME-Version: 1.0 In-Reply-To: <9972a9a6-b34e-7735-d4a7-5ff7c1be8fe0@linux.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, > 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 \ That is again something different, namely sata ... > instead of my original shortcut version: > > -drive file=disk.img,format=raw,cache=none,index=0,media=disk \ ... while this is the older pata (with "-machine pc"). To add even more confusion: When using the more modern q35 chipset ("-machine q35") qemu will also use the more modern sata when you use the shortcut version to attach your disk. So, in general it is a good idea to explicitly add the storage controller and devices you want as suggested by James. Results in less surprises ;) > 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. I've seen guest driver failures due to missing firmware initialization before. Specifically firmware not setting the busmaster bit in pci config space leading to guest driver's dma transfers failing (which of course is a guest driver bug). I can imagine ovmf taking shortcuts for direct kernel boot could have that kind of effect too, and of course it could vary depending on the kind of storage controller used. take care, Gerd