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.221.67, mailfrom: philmd@redhat.com) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by groups.io with SMTP; Wed, 24 Jul 2019 05:27:33 -0700 Received: by mail-wr1-f67.google.com with SMTP id p13so46746148wru.10 for ; Wed, 24 Jul 2019 05:27:33 -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=P+AZP+gSEDvpeoyqCu0pZ2NUcx+tfxBg0B2ZYbko7p8=; b=Vq1+Wpl5PtVpUoekTqjQZmUprB35qQgCDcEO9v/aTyGQILMCMetjBGtvXBG4yQseAQ R5J0sat7u6CrAeYJm7PScD2n6NgluAQR6oza0+z176YhxJPqXCovDCbjuk/cFQm+hSbY K60Vq/E8Tpo3vwk+l6fNcDoB9z6GFa7zDsc+F1kDN1LuMC/enoVBcTz8JeWAWSgHtFWg lNc3dUQfRzvhCdBeq+2NlWB+gxrpXGa0ljeI4rVsvFvxLIRjsjbf7Q5mjyFz46AfEOT0 VbrnLwQyFuLg2XJS05qSjQw4xC80pi7ogjdDty3xMUUCSr/Im6jk+MI0kBCJeWw4fnbY bbwA== X-Gm-Message-State: APjAAAVzzODjFwcdtn7FPB6Yl6QwOxBZ6kZXG5jtEcnpE7d1GwqUsgt5 tduuFK4/mIu5/fNLzdV7HWpCOA== X-Google-Smtp-Source: APXvYqwrpfMGOz8nTkzV0ACc4b8GVyhZApPkIV2lzLG3lkAvAGLjFUgQPmpWLYHj+SLyk69U5RGrrg== X-Received: by 2002:adf:f046:: with SMTP id t6mr2363270wro.307.1563971251881; Wed, 24 Jul 2019 05:27:31 -0700 (PDT) Return-Path: Received: from [10.201.33.105] ([195.166.127.210]) by smtp.gmail.com with ESMTPSA id x20sm35190759wmc.1.2019.07.24.05.27.30 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jul 2019 05:27:31 -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> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: <8c04a9e0-ac53-0bef-41df-9508b06b09cc@redhat.com> Date: Wed, 24 Jul 2019 14:27:28 +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: <156393689849.9039.6940197421609488727@jljusten-skl> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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. Reviewed-by: Philippe Mathieu-Daude