Commit c6a1d5f
committed
Initialize vnet.ram unconditionally for device tree
When no network device is specified via -n option, the virtio-net device
was left uninitialized but still exposed to guest via device tree. This
caused segmentation fault when guest attempted to initialize the device.
Root cause analysis:
- WFI merge (e4ae87e) introduced conditional initialization:
if (netdev) { virtio_net_init(); vnet.ram = ram; }
- Previous code always set vnet.ram regardless of netdev
- Guest kernel initializes all devices in device tree
- Without vnet.ram pointer, QueueReady handler crashed accessing NULL1 parent 137d4d0 commit c6a1d5f
2 files changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
770 | 770 | | |
771 | 771 | | |
772 | 772 | | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
773 | 777 | | |
774 | 778 | | |
775 | 779 | | |
776 | 780 | | |
777 | 781 | | |
778 | | - | |
779 | 782 | | |
780 | 783 | | |
781 | 784 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
362 | 366 | | |
363 | 367 | | |
364 | 368 | | |
| |||
0 commit comments