NetBSD-Bugs archive

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

Re: port-amd64/50636: NetBSD/amd64 7.99.25 does not boot on Google Compute Engine



On Jan 9, 11:30pm, ryo_on%yk.rim.or.jp@localhost (Ryo ONODERA) wrote:
-- Subject: Re: port-amd64/50636: NetBSD/amd64 7.99.25 does not boot on Googl

Thanks, that kmem_free() is wrong; try:

Index: virtio.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/virtio.c,v
retrieving revision 1.13
diff -u -u -r1.13 virtio.c
--- virtio.c    30 Oct 2015 20:38:31 -0000      1.13
+++ virtio.c    10 Jan 2016 01:06:29 -0000
@@ -942,7 +942,7 @@
        bus_space_write_4(sc->sc_iot, sc->sc_ioh,
                          VIRTIO_CONFIG_QUEUE_ADDRESS, 0);
 
-       kmem_free(vq->vq_entries, vq->vq_bytesize);
+       kmem_free(vq->vq_entries, sizeof(*vq->vq_entries) * vq->vq_num);
        bus_dmamap_unload(sc->sc_dmat, vq->vq_dmamap);
        bus_dmamap_destroy(sc->sc_dmat, vq->vq_dmamap);
        bus_dmamem_unmap(sc->sc_dmat, vq->vq_vaddr, vq->vq_bytesize);

Also I don't understand why it wants that much:

Index: if_vioif.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_vioif.c,v
retrieving revision 1.20
diff -u -u -r1.20 if_vioif.c
--- if_vioif.c  29 Oct 2015 02:29:41 -0000      1.20
+++ if_vioif.c  10 Jan 2016 01:09:07 -0000
@@ -430,7 +430,7 @@
                C_L1(txhdr_dmamaps[i], rx_hdrs[i],
                    sizeof(struct virtio_net_hdr), 1,
                    WRITE, "tx header");
-               C(tx_dmamaps[i], NULL, ETHER_MAX_LEN, 256 /* XXX */, 0,
+               C(tx_dmamaps[i], NULL, ETHER_MAX_LEN, 16 /* XXX */, 0,
                  "tx payload");
        }
 

christos


Home | Main Index | Thread Index | Old Index