Blame SOURCES/kvm-docs-Add-PXB-documentation.patch

8be556
From 5bbadf30a3ac2651b67b71aa105fe3f854e4d2ef Mon Sep 17 00:00:00 2001
8be556
From: Marcel Apfelbaum <marcel@redhat.com>
8be556
Date: Wed, 24 Jun 2015 13:53:36 +0200
8be556
Subject: [PATCH 213/217] docs: Add PXB documentation
8be556
8be556
Message-id: <1435154016-26233-44-git-send-email-marcel@redhat.com>
8be556
Patchwork-id: 66470
8be556
O-Subject: [RHEL-7.2 qemu-kvm-rhev PATCH 43/43] docs: Add PXB documentation
8be556
Bugzilla: 1103313
8be556
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
8be556
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
8be556
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
8be556
8be556
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
8be556
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
8be556
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
8be556
Acked-by: Laszlo Ersek <lersek@redhat.com>
8be556
(cherry picked from commit 814550d73a94dcf9f2c9f8d2ee280226f1145388)
8be556
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
8be556
---
8be556
 docs/pci_expander_bridge.txt | 58 ++++++++++++++++++++++++++++++++++++++++++++
8be556
 1 file changed, 58 insertions(+)
8be556
 create mode 100644 docs/pci_expander_bridge.txt
8be556
8be556
diff --git a/docs/pci_expander_bridge.txt b/docs/pci_expander_bridge.txt
8be556
new file mode 100644
8be556
index 0000000..d7913fb
8be556
--- /dev/null
8be556
+++ b/docs/pci_expander_bridge.txt
8be556
@@ -0,0 +1,58 @@
8be556
+PCI EXPANDER BRIDGE (PXB)
8be556
+=========================
8be556
+
8be556
+Description
8be556
+===========
8be556
+PXB is a "light-weight" host bridge in the same PCI domain
8be556
+as the main host bridge whose purpose is to enable
8be556
+the main host bridge to support multiple PCI root buses.
8be556
+It is implemented only for i440fx and can be placed only
8be556
+on bus 0 (pci.0).
8be556
+
8be556
+As opposed to PCI-2-PCI bridge's secondary bus, PXB's bus
8be556
+is a primary bus and can be associated with a NUMA node
8be556
+(different from the main host bridge) allowing the guest OS
8be556
+to recognize the proximity of a pass-through device to
8be556
+other resources as RAM and CPUs.
8be556
+
8be556
+Usage
8be556
+=====
8be556
+A detailed command line would be:
8be556
+
8be556
+[qemu-bin + storage options]
8be556
+-m 2G
8be556
+-object memory-backend-ram,size=1024M,policy=bind,host-nodes=0,id=ram-node0 -numa node,nodeid=0,cpus=0,memdev=ram-node0
8be556
+-object memory-backend-ram,size=1024M,policy=bind,host-nodes=1,id=ram-node1 -numa node,nodeid=1,cpus=1,memdev=ram-node1
8be556
+-device pxb,id=bridge1,bus=pci.0,numa_node=1,bus_nr=4 -netdev user,id=nd-device e1000,bus=bridge1,addr=0x4,netdev=nd
8be556
+-device pxb,id=bridge2,bus=pci.0,numa_node=0,bus_nr=8,bus=pci.0 -device e1000,bus=bridge2,addr=0x3
8be556
+-device pxb,id=bridge3,bus=pci.0,bus_nr=40,bus=pci.0 -drive if=none,id=drive0,file=[img] -device virtio-blk-pci,drive=drive0,scsi=off,bus=bridge3,addr=1
8be556
+
8be556
+Here you have:
8be556
+ - 2 NUMA nodes for the guest, 0 and 1. (both mapped to the same NUMA node in host, but you can and should put it in different host NUMA nodes)
8be556
+ - a pxb host bridge attached to NUMA 1 with an e1000 behind it
8be556
+ - a pxb host bridge attached to NUMA 0 with an e1000 behind it
8be556
+ - a pxb host bridge not attached to any NUMA with a hard drive behind it.
8be556
+
8be556
+Limitations
8be556
+===========
8be556
+Please observe that we specified the bus "pci.0" for the second and third pxb.
8be556
+This is because when no bus is given, another pxb can be selected by QEMU as default bus,
8be556
+however, PXBs can be placed only under the root bus.
8be556
+
8be556
+Implementation
8be556
+==============
8be556
+The PXB is composed by:
8be556
+- HostBridge (TYPE_PXB_HOST)
8be556
+  The host bridge allows to register and query the PXB's rPCI root bus in QEMU.
8be556
+- PXBDev(TYPE_PXB_DEVICE)
8be556
+  It is a regular PCI Device that resides on the piix host-bridge bus and its bus uses the same PCI domain.
8be556
+  However, the bus behind is exposed through ACPI as a primary PCI bus and starts a new PCI hierarchy.
8be556
+  The interrupts from devices behind the PXB are routed through this device the same as if it were a
8be556
+  PCI-2-PCI bridge. The _PRT follows the i440fx model.
8be556
+- PCIBridgeDev(TYPE_PCI_BRIDGE_DEV)
8be556
+  Created automatically as part of init sequence.
8be556
+  When adding a device to PXB it is attached to the bridge for two reasons:
8be556
+  - Using the bridge will enable hotplug support
8be556
+  - All the devices behind the bridge will use bridge's IO/MEM windows compacting
8be556
+    the PCI address space.
8be556
+
8be556
-- 
8be556
1.8.3.1
8be556