[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v2 0/2] ppc/pnv: Add model for Power8 PHB3 PCIe Host b
From: |
Cédric Le Goater |
Subject: |
[Qemu-ppc] [PATCH v2 0/2] ppc/pnv: Add model for Power8 PHB3 PCIe Host bridge |
Date: |
Thu, 28 Jun 2018 10:36:31 +0200 |
This is a model of the PCIe Host Bridge (PHB3) controller found on a
Power8 processor. The Power8 processor comes in different flavors:
Venice, Murano, Naple, each having a different number of PHBs. Multi
chip is supported, each chip adding its set of PHB3 controllers and
PCI busses.
There is no default device layout and PCI devices should be added to
the machine using command line options such as :
-device e1000,netdev=net0,mac=C0:FF:EE:00:00:02,bus=pci.0,addr=0x2
-netdev
bridge,id=net0,helper=/usr/libexec/qemu-bridge-helper,br=virbr0,id=hostnet0
-device megasas,id=scsi0,bus=pci.0,addr=0x1
-drive file=$disk,if=none,id=drive-scsi0-0-0-0,format=qcow2,cache=none
-device
scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=2
The last patch explores the possibility of user creatable PHB3
devices. Nothing complex but the QEMU powernv machine models a
baremetal system on which it does not make sense to plug such
controllers. I don't think we should allow it.
Git tree available here for testing, based on David's branch:
https://github.com/legoater/qemu/tree/phb3-3.0
Thanks,
C.
Changes sinces v1 :
- removed duplication of macros for the register definitions
- fixed multi chip support
- introduced a chip class attribute to create all possible PHB3
devices
- introduced property handlers to check the validity of the phb index
and the chip id
- explored user creatable PHB3 devices
Benjamin Herrenschmidt (1):
ppc/pnv: Add model for Power8 PHB3 PCIe Host bridge
Cédric Le Goater (1):
ppc/pnv: make the PHB3 devices user creatable
default-configs/ppc64-softmmu.mak | 1 +
include/hw/pci-host/pnv_phb3.h | 163 +++++
include/hw/pci-host/pnv_phb3_regs.h | 467 +++++++++++++
include/hw/ppc/pnv.h | 22 +
include/hw/ppc/pnv_xscom.h | 9 +
include/hw/ppc/xics.h | 1 +
hw/intc/xics.c | 2 +-
hw/pci-host/pnv_phb3.c | 1242 +++++++++++++++++++++++++++++++++++
hw/pci-host/pnv_phb3_msi.c | 316 +++++++++
hw/pci-host/pnv_phb3_pbcq.c | 358 ++++++++++
hw/ppc/pnv.c | 64 +-
hw/ppc/pnv_xscom.c | 6 +-
hw/pci-host/Makefile.objs | 1 +
13 files changed, 2647 insertions(+), 5 deletions(-)
create mode 100644 include/hw/pci-host/pnv_phb3.h
create mode 100644 include/hw/pci-host/pnv_phb3_regs.h
create mode 100644 hw/pci-host/pnv_phb3.c
create mode 100644 hw/pci-host/pnv_phb3_msi.c
create mode 100644 hw/pci-host/pnv_phb3_pbcq.c
--
2.13.6
- [Qemu-ppc] [PATCH v2 0/2] ppc/pnv: Add model for Power8 PHB3 PCIe Host bridge,
Cédric Le Goater <=