public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [OVMF] OVMF Support Dual-Socket boot?
@ 2017-03-01  6:06 Tiger Liu
  2017-03-01  9:37 ` Laszlo Ersek
  0 siblings, 1 reply; 5+ messages in thread
From: Tiger Liu @ 2017-03-01  6:06 UTC (permalink / raw)
  To: edk2-devel@lists.01.org

Hi, Experts:
I have a question about dual-socket.

Does Ovmf FW supports Dual-Socket platform boot?

Such as:
Qemu emulates a dual-socket xeon platform, Could Ovmf UEFI Code boot on it?

Thanks

best wishes,


保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OVMF] OVMF Support Dual-Socket boot?
  2017-03-01  6:06 Tiger Liu
@ 2017-03-01  9:37 ` Laszlo Ersek
  0 siblings, 0 replies; 5+ messages in thread
From: Laszlo Ersek @ 2017-03-01  9:37 UTC (permalink / raw)
  To: Tiger Liu; +Cc: edk2-devel@lists.01.org

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OVMF] OVMF Support Dual-Socket boot?
@ 2017-03-01 10:11 Tiger Liu
  2017-03-01 18:25 ` Laszlo Ersek
  0 siblings, 1 reply; 5+ messages in thread
From: Tiger Liu @ 2017-03-01 10:11 UTC (permalink / raw)
  To: Laszlo Ersek; +Cc: edk2-devel@lists.01.org

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?

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OVMF] OVMF Support Dual-Socket boot?
  2017-03-01 10:11 [OVMF] OVMF Support Dual-Socket boot? Tiger Liu
@ 2017-03-01 18:25 ` Laszlo Ersek
  2017-03-02  1:01   ` 答复: " Tiger Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Laszlo Ersek @ 2017-03-01 18:25 UTC (permalink / raw)
  To: Tiger Liu; +Cc: edk2-devel@lists.01.org

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* 答复: [OVMF] OVMF Support Dual-Socket boot?
  2017-03-01 18:25 ` Laszlo Ersek
@ 2017-03-02  1:01   ` Tiger Liu
  0 siblings, 0 replies; 5+ messages in thread
From: Tiger Liu @ 2017-03-02  1:01 UTC (permalink / raw)
  To: Laszlo Ersek; +Cc: edk2-devel@lists.01.org

Hi, Laszlo:
Thank you very much!

it's very clear now!

best wishes,
-----邮件原件-----
发件人: Laszlo Ersek [mailto:lersek@redhat.com]
发送时间: 2017年3月2日 2:26
收件人: Tiger Liu
抄送: edk2-devel@lists.01.org
主题: Re: [edk2] [OVMF] OVMF Support Dual-Socket boot?

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



保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-02  1:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-01 10:11 [OVMF] OVMF Support Dual-Socket boot? Tiger Liu
2017-03-01 18:25 ` Laszlo Ersek
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox