NetBSD-Bugs archive

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

kern/52107: virtio does not work on sparc64

>Number:         52107
>Category:       kern
>Synopsis:       virtio does not work on sparc64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 23 16:10:00 +0000 2017
>Originator:     Martin Husemann
>Release:        NetBSD 7.99.66
The NetBSD Foundation, Inc.
System: NetBSD 7.99.66 NetBSD 7.99.66 (WHOEVER) #110: Tue Mar 21 11:42:55 CET 2017 sparc64
Architecture: sparc64
Machine: sparc64

I am trying to get virtio working in sparc64 kernels (tested against qemu).
This fails, and I am haven't read the virtio spec yet, so am filing this

I added a few debug printfs, comments inline:

virtio0 at pci0 dev 6 function 0
virtio0: Virtio Block Device (rev. 0x00)
ld0 at virtio0: Features: 0x10000054<INDIRECT_DESC,BLK_SIZE,GEOMETRY,SEG_MAX>
MAXPHYS -> maxxfersize = 65536
VIRTIO_BLK_F_SEG_MAX -> maxnsegs = 2113929216

2113929216 is way too big, would we use that value to create the vq mapping,
we would crash later, so I am clamping it to the default value for now:

maxxfersize / page size would be: maxnsegs = 8
virtio: allocsize1: 4096, allocsize2: 4096, allocsize3: 20480
virtio: vq_indirectoffset: 8192, vq_indirect: 0x12cdcc000
vq_size: 128, vq_maxnsegs: 10
ld0: 128 PB, 26368 cyl, 16 head, 63 sec, 131072 bytes/sect x 42785295971647488 sectors

128 PB would be nice, but I only gave it 50MB....

virtio0: interrupting at ivec 1818


add virtio devices to sparc64 kernel (exclude the baloon driver, it does not
like non-4k page sizes), boot kernel in qemu (avoid qemu 2.8, it has a 64bit
pci bug that makes the device not attach).


Home | Main Index | Thread Index | Old Index