From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.85.128.67, mailfrom: philmd@redhat.com) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by groups.io with SMTP; Wed, 24 Jul 2019 10:39:24 -0700 Received: by mail-wm1-f67.google.com with SMTP id p74so42542928wme.4 for ; Wed, 24 Jul 2019 10:39:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=q/VzefbuAPpL3lFJa2S+IMJ0CTCkEQ2krtdqm0p4niM=; b=D5ofQtY0AGeheTq80ggCn/yIxPWoHhr/ijTI6OQtsALS1dAzS1jOfXufPbpGL6h0mq bRVaWBdLa4gOnmTOD86WW56gfvBAq6oRrZ7wwSh1XIJBlUu01lc8dpSuP7QW8R/Px0Vp 6r1/IJofyfkxu8o854CQBQW2wcmCl5lGAXY62+Rhjf+q1aRcninGnifhrJcMSrW7/kUR ExiQa/L6gZ4wxK7tD23l7Tfv+WLAm7miwliljOTURBbCJqFAPgZzT35O6uGT5xorKx8c s3GR2u0tWt4ARxFHcytDJfHiB5TEvyMttSpgqkcsmKa5c+9BbsfiBooDHHQr1JLLI/m4 ecuw== X-Gm-Message-State: APjAAAX7ZIfq4tjQYGHP363ZXSLXLozcawSy1KpKvwBu8y3Bt/KFlPiX mHex0pLmYuTq1SBQ/i1AVX+Wuw== X-Google-Smtp-Source: APXvYqxgTjo6GgUvcHrIBscKuFYaajvtnT5WSIGOcxIYj+6t4yPotj/7cg+UYSYiquXSMRN6fI8LqQ== X-Received: by 2002:a1c:be05:: with SMTP id o5mr76458475wmf.52.1563989962901; Wed, 24 Jul 2019 10:39:22 -0700 (PDT) Return-Path: Received: from [10.201.33.105] ([195.166.127.210]) by smtp.gmail.com with ESMTPSA id i18sm61321078wrp.91.2019.07.24.10.39.21 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jul 2019 10:39:22 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu To: devel@edk2.groups.io, jordan.l.justen@intel.com, Ard Biesheuvel , Laszlo Ersek , rebecca@bsdio.com References: <20190724015101.13044-1-rebecca@bsdio.com> <156393689849.9039.6940197421609488727@jljusten-skl> <8c04a9e0-ac53-0bef-41df-9508b06b09cc@redhat.com> <156398919445.22585.9417541374118966045@jljusten-skl> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: Date: Wed, 24 Jul 2019 19:39:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <156398919445.22585.9417541374118966045@jljusten-skl> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 7/24/19 7:26 PM, Jordan Justen wrote: > On 2019-07-24 05:27:28, Philippe Mathieu-Daudé wrote: >> On 7/24/19 4:54 AM, Jordan Justen wrote: >>> On 2019-07-23 18:51:00, wrote: >>>> Specify the firmware to use via the newer '-drive if=pflash' syntax >>>> which allows specifying the raw format and readonly parameters. This >>>> avoids warnings with newer version of QEMU. >>>> >>>> Signed-off-by: Rebecca Cran >>>> --- >>>> OvmfPkg/build.sh | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh >>>> index a2c4eff2a5..e2890ff762 100755 >>>> --- a/OvmfPkg/build.sh >>>> +++ b/OvmfPkg/build.sh >>>> @@ -268,7 +268,7 @@ if [[ "$RUN_QEMU" == "yes" ]]; then >>>> fi >>>> ln -sf $FV_DIR/OVMF.fd $QEMU_FIRMWARE_DIR/bios.bin >>>> if [[ "$ENABLE_FLASH" == "yes" ]]; then >>>> - QEMU_COMMAND="$QEMU_COMMAND -pflash $QEMU_FIRMWARE_DIR/bios.bin" >>>> + QEMU_COMMAND="$QEMU_COMMAND -drive if=pflash,format=raw,readonly,file=$QEMU_FIRMWARE_DIR/bios.bin" >>> >>> It looks like we set ENABLE_FLASH for qemu 1.6 and newer. Does this >>> work on 1.6? >>> >>> Also, I don't think we want readonly. Read-write should allow >>> non-volatile variables to persist across multiple boot. >> >> This flash only contains the CODE, not the non-volatile VARS, using >> readonly makes sense to me. > > That's not the case here. The build.sh support uses a combined > code/vars binary. Originally the qemu pflash support only supported a > single binary. At this point we can probably assume that a new enough > version of qemu is available that supports multiple pflash devices, so > build.sh could be upgraded to use the split binaries. Oh I did not know, this show how young I'm ;) > Hmm, it looks like qemu 2.0 is when the multiple flash device support > was added: https://wiki.qemu.org/ChangeLog/2.0 > > The build.sh script currently attempts to detect 1.6 and newer for > flash support. pflash first appeared in 1.1, but kvm support was added > in 1.6. I think it'd be reasonable to alter the script to not use > flash for qemu < 2.0, to enable using separate code and vars binaries. Where can I find the range of QEMU versions used by EDK2? I'm trying to understand why it is important to still maintain scripts for a such old version. Thanks, Phil.