Skip to content

Commit 828bebf

Browse files
committed
qemu: Fix 9p mount to work on powernv
The powernv machine requires us to specify the PCI bus, otherwise the 9p mount doesn't work.
1 parent 3e506e1 commit 828bebf

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/qemu.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,12 @@ def qemu_command(qemu='qemu-system-ppc64', machine='pseries,cap-htm=off', cpu=No
8585
l.append(drive)
8686

8787
if host_mount:
88-
l.append(f'-virtfs local,path={host_mount},mount_tag=host,security_model=none')
88+
bus = ''
89+
if 'powernv' in machine:
90+
bus = ',bus=pcie.0'
91+
92+
l.append(f'-fsdev local,id=fsdev0,path={host_mount},security_model=none')
93+
l.append(f'-device virtio-9p-pci,fsdev=fsdev0,mount_tag=host{bus}')
8994

9095
if cpu is not None:
9196
l.append('-cpu')

0 commit comments

Comments
 (0)