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 EE11E82154 for ; Wed, 1 Mar 2017 10:25:51 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6176A4A547; Wed, 1 Mar 2017 18:25:52 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-249.phx2.redhat.com [10.3.116.249]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2B07D2D654; Wed, 1 Mar 2017 18:25:50 +0000 (UTC) To: Tiger Liu References: <1E4DA6F54C53C24B98E8E8D172B945AF87720D@ZXBJMBX02.zhaoxin.com> Cc: "edk2-devel@lists.01.org" From: Laszlo Ersek Message-ID: <0fd6d410-5778-9010-041a-3a2bbcd854e9@redhat.com> Date: Wed, 1 Mar 2017 19:25:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <1E4DA6F54C53C24B98E8E8D172B945AF87720D@ZXBJMBX02.zhaoxin.com> X-Scanned-By: MIMEDefang 2.74 on 10.5.11.28 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 01 Mar 2017 18:25:52 +0000 (UTC) Subject: Re: [OVMF] OVMF Support Dual-Socket boot? X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Mar 2017 18:25:52 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit (I've come down with the flu and I'm responding to emails only selectively for now, where not much thinking and work are required) On 03/01/17 11:11, Tiger Liu wrote: > Hi, Laszlo: > Thanks for your reply! > > So, dual-socket means two pci host bridges exist, and also means two pci segments exist. > Could current Ovmf pci related drivers handle them? I didn't catch your meaning of "dual socket"; I thought you were referring to QEMU's -smp sockets=... So, QEMU and OVMF do not support multiple host bridges / PCI segments. However, they do support multiple root bridges on the sole host bridge. The main root bridge always gets bus number 0, and you assign other bus numbers to the additional root bridges on the QEMU command line (or in the libvirt domain XML). Then, for each root bridge (including the main one), when the PCI hierarchy behind that root bridge is enumerated, bus numbers are available for dynamic assignment up to and excluding the next lowest root bridge bus number that was assigned on the QEMU command line. For the last root bridge (which is the main one in the most common, single root bridge setup) this upper limit for dynamic/recursive bus nr assignment is 255 (inclusive). In other words, if you want to use N root bridges, then you have to partition the 0..255 bus number space N-ways. Each root bridge gets, as its own fixed bus number, the number at the front of its respective interval, and buses/bridges behind that root bridge get bus numbers assigned (dynamically, by PciBusDxe) from the rest of the interval. It is the user's responsibility to size the partitions accordingly to the size / depth of the hierarchy behind the respective root bridge. On the UEFI level, this boils down to multiple EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instances. As explained above, the bus number apertures for these are distinct (partitioning the 0..255 space). However, all of them share the same IO, MMIO, and 64-bit MMIO apertures between each other. Please refer to the following QEMU documents for details: https://github.com/qemu/qemu/blob/master/docs/pci_expander_bridge.txt https://github.com/qemu/qemu/blob/master/docs/pcie.txt and to the libvirt documentation: http://libvirt.org/formatdomain.html#elementsControllers ... I think "pci_expander_bridge.txt" is a bit outdated; the same concept is available with the Q35 board, using PCI Express; the device name is "pxb-pcie". The other text file "pcie.txt" describes this. In general, if you are thinking about setting up a new guest for this, I recommend the Q35 board and a pure PCI Express hierarchy (see again "pcie.txt"). Thanks Laszlo > > best wishes, > > -----邮件原件----- > 发件人: Laszlo Ersek [mailto:lersek@redhat.com] > 发送时间: 2017年3月1日 17:37 > 收件人: Tiger Liu > 抄送: edk2-devel@lists.01.org > 主题: Re: [edk2] [OVMF] OVMF Support Dual-Socket boot? > > On 03/01/17 07:06, Tiger Liu wrote: >> Hi, Experts: >> I have a question about dual-socket. >> >> Does Ovmf FW supports Dual-Socket platform boot? > > Yes, it does. > >> Such as: >> Qemu emulates a dual-socket xeon platform, Could Ovmf UEFI Code boot on it? > > I think all of my long-term OVMF guests are SMP (4 or 8 VCPUs generally, on my laptop at least). > > Thanks > Laszlo > > > 保密声明: > 本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。 > CONFIDENTIAL NOTE: > This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited. >