public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Tiger Liu <TigerLiu@zhaoxin.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@ml01.01.org>
Subject: Re: [OVMF] OVMF Support Dual-Socket boot?
Date: Wed, 1 Mar 2017 19:25:49 +0100	[thread overview]
Message-ID: <0fd6d410-5778-9010-041a-3a2bbcd854e9@redhat.com> (raw)
In-Reply-To: <1E4DA6F54C53C24B98E8E8D172B945AF87720D@ZXBJMBX02.zhaoxin.com>

(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.
> 



  reply	other threads:[~2017-03-01 18:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-01 10:11 [OVMF] OVMF Support Dual-Socket boot? Tiger Liu
2017-03-01 18:25 ` Laszlo Ersek [this message]
2017-03-02  1:01   ` 答复: " Tiger Liu
  -- strict thread matches above, loose matches on Subject: below --
2017-03-01  6:06 Tiger Liu
2017-03-01  9:37 ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0fd6d410-5778-9010-041a-3a2bbcd854e9@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox