~ubuntu-branches/ubuntu/trusty/qemu/trusty

« back to all changes in this revision

Viewing changes to hw/net/vmxnet3.c

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2013-10-22 22:47:07 UTC
  • mfrom: (1.8.3) (10.1.42 sid)
  • Revision ID: package-import@ubuntu.com-20131022224707-1lya34fw3k3f24tv
Tags: 1.6.0+dfsg-2ubuntu1
* Merge 1.6.0~rc0+dfsg-2exp from debian experimental.  Remaining changes:
  - debian/control
    * update maintainer
    * remove libiscsi, usb-redir, vde, vnc-jpeg, and libssh2-1-dev
      from build-deps
    * enable rbd
    * add qemu-system and qemu-common B/R to qemu-keymaps
    * add D:udev, R:qemu, R:qemu-common and B:qemu-common to
      qemu-system-common
    * qemu-system-arm, qemu-system-ppc, qemu-system-sparc:
      - add qemu-kvm to Provides
      - add qemu-common, qemu-kvm, kvm to B/R
      - remove openbios-sparc from qemu-system-sparc D
      - drop openbios-ppc and openhackware Depends to Suggests (for now)
    * qemu-system-x86:
      - add qemu-common to Breaks/Replaces.
      - add cpu-checker to Recommends.
    * qemu-user: add B/R:qemu-kvm
    * qemu-kvm:
      - add armhf armel powerpc sparc to Architecture
      - C/R/P: qemu-kvm-spice
    * add qemu-common package
    * drop qemu-slof which is not packaged in ubuntu
  - add qemu-system-common.links for tap ifup/down scripts and OVMF link.
  - qemu-system-x86.links:
    * remove pxe rom links which are in kvm-ipxe
    * add symlink for kvm.1 manpage
  - debian/rules
    * add kvm-spice symlink to qemu-kvm
    * call dh_installmodules for qemu-system-x86
    * update dh_installinit to install upstart script
    * run dh_installman (Closes: #709241) (cherrypicked from 1.5.0+dfsg-2)
  - Add qemu-utils.links for kvm-* symlinks.
  - Add qemu-system-x86.qemu-kvm.upstart and .default
  - Add qemu-system-x86.modprobe to set nesting=1
  - Add qemu-system-common.preinst to add kvm group
  - qemu-system-common.postinst: remove bad group acl if there, then have
    udev relabel /dev/kvm.
  - New linaro patches from qemu-linaro rebasing branch
  - Dropped patches:
    * xen-simplify-xen_enabled.patch
    * sparc-linux-user-fix-missing-symbols-in-.rel-.rela.plt-sections.patch
    * main_loop-do-not-set-nonblocking-if-xen_enabled.patch
    * xen_machine_pv-do-not-create-a-dummy-CPU-in-machine-.patch
    * virtio-rng-fix-crash
  - Kept patches:
    * expose_vms_qemu64cpu.patch - updated
    * linaro arm patches from qemu-linaro rebasing branch
  - New patches:
    * fix-pci-add: change CONFIG variable in ifdef to make sure that
      pci_add is defined.
* Add linaro patches
* Add experimental mach-virt patches for arm virtualization.
* qemu-system-common.install: add debian/tmp/usr/lib to install the
  qemu-bridge-helper

Show diffs side-by-side

added added

removed removed

Lines of Context:
528
528
        break;
529
529
 
530
530
    default:
531
 
        assert(false);
 
531
        g_assert_not_reached();
532
532
        return false;
533
533
    }
534
534
 
575
575
            stats->ucastBytesTxOK += tot_len;
576
576
            break;
577
577
        default:
578
 
            assert(false);
 
578
            g_assert_not_reached();
579
579
        }
580
580
 
581
581
        if (s->offload_mode == VMXNET3_OM_TSO) {
599
599
        break;
600
600
 
601
601
    default:
602
 
        assert(false);
 
602
        g_assert_not_reached();
603
603
    }
604
604
}
605
605
 
634
634
            stats->ucastBytesRxOK += tot_len;
635
635
            break;
636
636
        default:
637
 
            assert(false);
 
637
            g_assert_not_reached();
638
638
        }
639
639
 
640
640
        if (tot_len > s->mtu) {
643
643
        }
644
644
        break;
645
645
    default:
646
 
        assert(false);
 
646
        g_assert_not_reached();
647
647
    }
648
648
}
649
649
 
1106
1106
{
1107
1107
    if (VMW_IS_MULTIREG_ADDR(addr, VMXNET3_REG_IMR,
1108
1108
                        VMXNET3_MAX_INTRS, VMXNET3_REG_ALIGN)) {
1109
 
        assert(false);
 
1109
        g_assert_not_reached();
1110
1110
    }
1111
1111
 
1112
1112
    VMW_CBPRN("BAR0 unknown read [%" PRIx64 "], size %d", addr, size);
1651
1651
    case VMXNET3_REG_ICR:
1652
1652
        VMW_CBPRN("Write BAR1 [VMXNET3_REG_ICR] = %" PRIx64 ", size %d",
1653
1653
                  val, size);
1654
 
        assert(false);
 
1654
        g_assert_not_reached();
1655
1655
        break;
1656
1656
 
1657
1657
    /* Event Cause Register */
1801
1801
        break;
1802
1802
 
1803
1803
    default:
1804
 
        assert(false);
 
1804
        g_assert_not_reached();
1805
1805
    }
1806
1806
 
1807
1807
    return true;
1892
1892
    vmxnet_tx_pkt_reset(s->tx_pkt);
1893
1893
    vmxnet_tx_pkt_uninit(s->tx_pkt);
1894
1894
    vmxnet_rx_pkt_uninit(s->rx_pkt);
1895
 
    qemu_del_net_client(qemu_get_queue(s->nic));
 
1895
    qemu_del_nic(s->nic);
1896
1896
}
1897
1897
 
1898
1898
static void vmxnet3_net_init(VMXNET3State *s)
2073
2073
 
2074
2074
    VMW_CBPRN("Starting init...");
2075
2075
 
2076
 
    memory_region_init_io(&s->bar0, &b0_ops, s,
 
2076
    memory_region_init_io(&s->bar0, OBJECT(s), &b0_ops, s,
2077
2077
                          "vmxnet3-b0", VMXNET3_PT_REG_SIZE);
2078
2078
    pci_register_bar(pci_dev, VMXNET3_BAR0_IDX,
2079
2079
                     PCI_BASE_ADDRESS_SPACE_MEMORY, &s->bar0);
2080
2080
 
2081
 
    memory_region_init_io(&s->bar1, &b1_ops, s,
 
2081
    memory_region_init_io(&s->bar1, OBJECT(s), &b1_ops, s,
2082
2082
                          "vmxnet3-b1", VMXNET3_VD_REG_SIZE);
2083
2083
    pci_register_bar(pci_dev, VMXNET3_BAR1_IDX,
2084
2084
                     PCI_BASE_ADDRESS_SPACE_MEMORY, &s->bar1);
2085
2085
 
2086
 
    memory_region_init(&s->msix_bar, "vmxnet3-msix-bar",
 
2086
    memory_region_init(&s->msix_bar, OBJECT(s), "vmxnet3-msix-bar",
2087
2087
                       VMXNET3_MSIX_BAR_SIZE);
2088
2088
    pci_register_bar(pci_dev, VMXNET3_MSIX_BAR_IDX,
2089
2089
                     PCI_BASE_ADDRESS_SPACE_MEMORY, &s->msix_bar);
2453
2453
    dc->reset = vmxnet3_qdev_reset;
2454
2454
    dc->vmsd = &vmstate_vmxnet3;
2455
2455
    dc->props = vmxnet3_properties;
 
2456
    set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
2456
2457
}
2457
2458
 
2458
2459
static const TypeInfo vmxnet3_info = {