From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0B3FA20082E9A for ; Mon, 12 Jun 2017 09:04:02 -0700 (PDT) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7A08080F8E; Mon, 12 Jun 2017 16:05:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7A08080F8E Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=pbonzini@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7A08080F8E Received: from [10.36.116.18] (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v5CG585T029270 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 12 Jun 2017 12:05:09 -0400 To: "Michael S. Tsirkin" , Laszlo Ersek Cc: SeaBIOS devel list , qemu devel list , edk2-devel-ml01 , "Kevin O'Connor" , Ard Biesheuvel , Ben Warren , Dongjiu Geng , Igor Mammedov , "Jordan Justen (Intel address)" , "Leif Lindholm (Linaro address)" , Shannon Zhao , Stefan Berger , Xiao Guangrong , "Dr. David Alan Gilbert" , Gerd Hoffmann References: <2ff62b03-d71b-93c4-79bf-10682b229758@redhat.com> <20170605185815-mutt-send-email-mst@kernel.org> <20170608204207-mutt-send-email-mst@kernel.org> From: Paolo Bonzini Message-ID: Date: Mon, 12 Jun 2017 18:05:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <20170608204207-mutt-send-email-mst@kernel.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 12 Jun 2017 16:05:15 +0000 (UTC) Subject: Re: allocation zone extensions for the firmware linker/loader X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jun 2017 16:04:02 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 08/06/2017 19:44, Michael S. Tsirkin wrote: > On Tue, Jun 06, 2017 at 08:10:17PM +0200, Laszlo Ersek wrote: >> On 06/05/17 18:02, Michael S. Tsirkin wrote: >>> On Sat, Jun 03, 2017 at 09:36:23AM +0200, Laszlo Ersek wrote: >>>> On 06/02/17 17:45, Laszlo Ersek wrote: >>>> >>>>> The patches can cause linker/loader breakage when old firmware is booted >>>>> on new QEMU. However, that's no problem (it's nothing new), the next >>>>> release of QEMU should bundle the new firmware binaries as always. >>>> >>>> Dave made a good point (which I should have realized myself, really!), >>>> namely if you launch old fw on old qemu, then migrate the guest to a new >>>> qemu and then reboot the guest on the target host, within the migrated >>>> VM, things will break. >>>> >>>> So that makes this approach dead in the water. >>>> >>>> Possible mitigations I could think of: >>>> - Make it machine type dependent. Complicated (we don't usually bind >>>> ACPI generation to machine types) and wouldn't help existing devices. >>>> - Let the firmware negotiate these extensions. Very complicated (new >>>> fw-cfg files are needed for negotiation) and wouldn't help existing devices. >>> >>> This last option *shouldn't* be complicated. If it is something's wrong. >>> >>> Maybe we made a mistake when we added etc/smi/*features*. >>> >>> It's not too late to move these to etc/*features* for new >>> machine types if we want to and if you can do the firmware >>> work. Then you'd just take out a bit and be done with it. >>> >>> I don't insist on doing the ACPI thing now but I do think >>> infrastructure for negotiating extensions should be there. >> >> Different drivers in the firmware would need to negotiate different >> questions / features with QEMU independently of each other. The "thing" >> in OVMF that negotiates (and uses) the SMI broadcast is very-very >> different and separate from the "thing" in OVMF that handles the ACPI >> linker/loader script. > > They both could call a common library. > > Also, we don't need separate fw cfg files - we could > reserve ranges of bits in a single file. > E.g. bits 0-31 - smi, 32-63 - tseg, etc. TSEG size is an integer, not a boolean... Paolo