Skip to content

Commit 0571ae5

Browse files
committed
OpTestQemu: Use an e1000 NIC
The virtio NIC is not properly supported on the powernv QEMU model so use an e1000 NIC that the op-build skiroot_defconfig includes kernel support for. Signed-off-by: Samuel Mendoza-Jonas <[email protected]>
1 parent 6e78eea commit 0571ae5

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

common/OpTestQemu.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def __init__(self, qemu_binary=None, pnor=None, skiboot=None,
7171
self.block_setup_term = block_setup_term # allows caller specific control of when to block setup_term
7272
self.setup_term_quiet = 0 # tells setup_term to not throw exceptions, like when system off
7373
self.setup_term_disable = 0 # flags the object to abandon setup_term operations, like when system off
74+
self.mac_str = '52:54:00:22:34:56'
7475

7576
# state tracking, reset on boot and state changes
7677
# console tracking done on System object for the system console
@@ -154,12 +155,18 @@ def connect(self):
154155
+ " -device pcie-pci-bridge,id=pcie.5,bus=pcie.2,addr=0x0"
155156
)
156157

157-
prefilled_slots = 0
158+
# Put the NIC in slot 2 of the second PHB (1st is reserved for later)
159+
cmd = (cmd
160+
+ " -netdev user,id=u1 -device e1000e,netdev=u1,mac={},bus=pcie.4,addr=2"
161+
.format(self.mac_str)
162+
)
163+
prefilled_slots = 1
164+
158165
if self.cdrom is not None:
159-
# Put the CDROM in slot 2 of the second PHB (1 is reserved for later)
166+
# Put the CDROM in slot 3 of the second PHB
160167
cmd = (cmd
161168
+ " -drive file={},id=cdrom01,if=none,media=cdrom".format(self.cdrom)
162-
+ " -device virtio-blk-pci,drive=cdrom01,id=virtio02,bus=pcie.4,addr=2"
169+
+ " -device virtio-blk-pci,drive=cdrom01,id=virtio02,bus=pcie.4,addr=3"
163170
)
164171
prefilled_slots += 1
165172

0 commit comments

Comments
 (0)