qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 00/19] s390x: Add Full Boot Order Support


From: Thomas Huth
Subject: Re: [PATCH v5 00/19] s390x: Add Full Boot Order Support
Date: Mon, 11 Nov 2024 13:23:18 +0100
User-agent: Mozilla Thunderbird

On 08/11/2024 15.37, Thomas Huth wrote:
...
And in case you're interested (it's maybe not so important since it's rather unlikely that the users will do this), there is another issue when trying to boot from multiple network devices where the first one has a DHCP server but no bootfile:

qemu-system-s390x -nographic -accel kvm -m 2G -netdev user,id=n1 \
  -device virtio-net-ccw,netdev=n1,bootindex=1 \
  -netdev user,id=n2,tftp=/boot,bootfile=vmlinuz \
  -device virtio-net-ccw,netdev=n2,bootindex=2 -d guest_errors

The firmware seems to panic while trying to request DHCP information from the second boot device.

I had a look at this problem now, and the solution is as simple as this:

diff --git a/pc-bios/s390-ccw/virtio-net.c b/pc-bios/s390-ccw/virtio-net.c
--- a/pc-bios/s390-ccw/virtio-net.c
+++ b/pc-bios/s390-ccw/virtio-net.c
@@ -51,6 +51,8 @@ int virtio_net_init(void *mac_addr)
     void *buf;
     int i;

+    rx_last_idx = 0;
+
     vdev->guest_features[0] = VIRTIO_NET_F_MAC_BIT;
     virtio_setup_ccw(vdev);

Otherwise the rx_last_idx does not get reset to 0 when starting the 2nd network boot, so the code tries to access some ring data that contains garbage later. I'll send it as a proper patch...

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]