Page MenuHomeFreeBSD

D15821.diff
No OneTemporary

D15821.diff

Index: head/sys/dev/virtio/mmio/virtio_mmio.c
===================================================================
--- head/sys/dev/virtio/mmio/virtio_mmio.c
+++ head/sys/dev/virtio/mmio/virtio_mmio.c
@@ -512,7 +512,8 @@
if (sc->vtmmio_vqs == NULL)
return (ENOMEM);
- vtmmio_write_config_4(sc, VIRTIO_MMIO_GUEST_PAGE_SIZE, 1 << PAGE_SHIFT);
+ vtmmio_write_config_4(sc, VIRTIO_MMIO_GUEST_PAGE_SIZE,
+ (1 << PAGE_SHIFT));
for (idx = 0; idx < nvqs; idx++) {
vqx = &sc->vtmmio_vqs[idx];
@@ -537,10 +538,10 @@
VIRTIO_MMIO_VRING_ALIGN);
#if 0
device_printf(dev, "virtqueue paddr 0x%08lx\n",
- (uint64_t)virtqueue_paddr(vq));
+ (uint64_t)virtqueue_paddr(vq));
#endif
vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_PFN,
- virtqueue_paddr(vq) >> PAGE_SHIFT);
+ virtqueue_paddr(vq) >> PAGE_SHIFT);
vqx->vtv_vq = *info->vqai_vq = vq;
vqx->vtv_no_intr = info->vqai_intr == NULL;
@@ -592,6 +593,9 @@
vtmmio_negotiate_features(dev, features);
+ vtmmio_write_config_4(sc, VIRTIO_MMIO_GUEST_PAGE_SIZE,
+ (1 << PAGE_SHIFT));
+
for (idx = 0; idx < sc->vtmmio_nvqs; idx++) {
error = vtmmio_reinit_virtqueue(sc, idx);
if (error)
@@ -766,6 +770,13 @@
if (error)
return (error);
+ vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_NUM, size);
+ vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_ALIGN,
+ VIRTIO_MMIO_VRING_ALIGN);
+#if 0
+ device_printf(sc->dev, "virtqueue paddr 0x%08lx\n",
+ (uint64_t)virtqueue_paddr(vq));
+#endif
vtmmio_write_config_4(sc, VIRTIO_MMIO_QUEUE_PFN,
virtqueue_paddr(vq) >> PAGE_SHIFT);

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 16, 2:05 AM (10 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25324342
Default Alt Text
D15821.diff (1 KB)

Event Timeline