So I wanted to toy around with my Quad and see if I could get IOMMU for PCIPassthrough to work on it, Sadly, tho there is some reference to IOMMU in dmesg and there is vfio-pci modules and they do load, I don't get any IOMMU_Groups:
So, I suppose the U4 Chipset doesn't support IOMMU for PCIPassthrough, tho people were able to do something called PCI-Proxy with Mac-On-Linux. I have a pure 64bit kernel and userspace on my Quad, so no MOL here, but I do have a late 2005 Dual 2.3Ghz with Mate 16.04 installed that MOL works on, so I'll update later to see if I can get PCI-Proxy to work with MOL on that machine.
Anyway, I wondered what PowerPC machines had a chipset that supports IOMMU for PCIPassthrough, and I also wanted to test KVM on the Quad to see if I could pass all four cores to a virtual machine. Saddly the Mac99 machine in Qemu only supports one core, and even if we hack it to support more, Openbios only propagates one core in the device tree, and I haven't been able to successfully get Openbios to add more than one cpu to the device tree.
With that in mind, in Qemu the pseries machine type supports up to 4 cores, so I figured I play with that.
Note the fact that the pseries-2.1 does support IOMMU for PCIPassthrough:
Be nice to track down an old IBM Pseries server to play with.......
Code:
sudo dmesg | grep -i -e DMAR -e IOMMU
[sudo] password for jam:
[ 0.000000] DART IOMMU initialized for U4 type chipset
[ 0.033492] IOMMU table initialized, virtual merging enabled
[ 2.308755] sata_svw 0001:03:0c.0: Using 32-bit DMA via iommu
[ 2.310276] tg3 0001:05:04.0: Using 32-bit DMA via iommu
[ 2.347684] nouveau 0001:06:00.0: Using 32-bit DMA via iommu
[ 2.373602] tg3 0001:05:04.1: Using 32-bit DMA via iommu
[ 2.718196] nouveau 0001:06:00.0: Using 32-bit DMA via iommu
Code:
lsmod | grep vfio
vfio_pci 53474 0
vfio_virqfd 4812 1 vfio_pci
vfio_iommu_spapr_tce 16747 0
vfio_spapr_eeh 2994 2 vfio_iommu_spapr_tce,vfio_pci
vfio 30544 2 vfio_iommu_spapr_tce,vfio_pci
Code:
ls /sys/kernel/iommu_groups
none
So, I suppose the U4 Chipset doesn't support IOMMU for PCIPassthrough, tho people were able to do something called PCI-Proxy with Mac-On-Linux. I have a pure 64bit kernel and userspace on my Quad, so no MOL here, but I do have a late 2005 Dual 2.3Ghz with Mate 16.04 installed that MOL works on, so I'll update later to see if I can get PCI-Proxy to work with MOL on that machine.
Anyway, I wondered what PowerPC machines had a chipset that supports IOMMU for PCIPassthrough, and I also wanted to test KVM on the Quad to see if I could pass all four cores to a virtual machine. Saddly the Mac99 machine in Qemu only supports one core, and even if we hack it to support more, Openbios only propagates one core in the device tree, and I haven't been able to successfully get Openbios to add more than one cpu to the device tree.
With that in mind, in Qemu the pseries machine type supports up to 4 cores, so I figured I play with that.
Code:
qemu-system-ppc64 --enable-kvm \
--machine pseries-2.1 -cpu host \
-smp 4,cores=4,threads=1 \
-drive file=IBM.img,if=virtio \
-prom-env 'auto-boot?=false'\
-m 1024 -device ich9-usb-ehci2 \
-vga none -serial stdio
Note the fact that the pseries-2.1 does support IOMMU for PCIPassthrough:
Code:
Linux debian 4.19.0-4-powerpc64 #1 SMP Debian 4.19.28-2 (2019-03-15) ppc64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
jam@debian:~$ ./groups.sh
IOMMU Groups sys/kernel/iommu_groups/0:
00:00.0 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 [8086:293c] (rev 03)
00:01.0 SCSI storage controller [0100]: Red Hat, Inc. Virtio block device [1af4:1001]
Code:
jam@debian:~$ sudo dmesg | grep -i -e DMAR -e IOMMU
[sudo] password for jam:
[ 0.330824] IOMMU table initialized, virtual merging enabled
[ 0.330974] iommu: Adding device 0000:00:00.0 to group 0
[ 0.331085] iommu: Adding device 0000:00:01.0 to group 0
Code:
jam@debian:~$ cat /proc/cpuinfo
processor : 0
cpu : PPC970MP, altivec supported
clock : 1250.000000MHz
revision : 1.1 (pvr 0044 0101)
processor : 1
cpu : PPC970MP, altivec supported
clock : 1250.000000MHz
revision : 1.1 (pvr 0044 0101)
processor : 2
cpu : PPC970MP, altivec supported
clock : 1250.000000MHz
revision : 1.1 (pvr 0044 0101)
processor : 3
cpu : PPC970MP, altivec supported
clock : 1250.000000MHz
revision : 1.1 (pvr 0044 0101)
timebase : 33333333
platform : pSeries
model : IBM pSeries (emulated by qemu)
machine : CHRP IBM pSeries (emulated by qemu)
MMU : Hash
Be nice to track down an old IBM Pseries server to play with.......
Last edited: