From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=45.249.212.190; helo=huawei.com; envelope-from=zhengxiang9@huawei.com; receiver=edk2-devel@lists.01.org Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) (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 646CD21E4902C for ; Wed, 14 Mar 2018 02:10:38 -0700 (PDT) Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 2E6F274C96FBA; Wed, 14 Mar 2018 17:16:47 +0800 (CST) Received: from [127.0.0.1] (10.177.29.32) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.361.1; Wed, 14 Mar 2018 17:16:41 +0800 To: Laszlo Ersek , edk2-devel-01 CC: Ard Biesheuvel , Jordan Justen , Shannon Zhao , "Xiang Zheng" References: <20180313212233.19215-1-lersek@redhat.com> From: "zhengxiang (A)" Message-ID: Date: Wed, 14 Mar 2018 17:16:36 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180313212233.19215-1-lersek@redhat.com> X-Originating-IP: [10.177.29.32] X-CFilter-Loop: Reflected Subject: Re: [PATCH 0/6] OvmfPkg, ArmVirtQemu: leaner platform BDS policy for connecting devices X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 09:10:40 -0000 Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit On 2018/3/14 5:22, Laszlo Ersek wrote: > Repo: https://github.com/lersek/edk2.git > Branch: qemu_bootorder_connect > > Adding tens or hundreds of bootable devices to a QEMU VM config slows > the OVMF and ArmVirtQemu boots to a crawl, several people have reported > in the past. > > There are at least two reasons for this (high pflash traffic due to > heavy nvvar massaging per device, and PCI config space access slowing > down on QEMU as the number of regions increases). However, part of the > pain is self-inflicted in our PlatformBootManagerLib instances: we > connect all bootable devices (for maximum compatibility with the user's > VM config) even if the user doesn't intend to boot off most of them. > > It's oft repeated that the set of devices connected during boot is > platform policy, so this series replaces the culprit > EfiBootManagerConnectAll() calls with a bit smarter algorithm. > > I sought to keep the commit messages under control. > Thanks, Laszlo! It works for booting QEMU VM with 60-virtio-scsi and 24-virtio-net on ARM64. The boot time reduces from more than one hour to ~90 seconds. Tested-by: Xiang Zheng Thanks, Xiang