3.7.34 VirtioNetMMIO

Virtio net device over MMIO transport. This model is written in C++.

About VirtioNetMMIO

This is a model of a virtual Ethernet virtio device over MMIO transport, supporting both legacy and current OASIS virtio specifications. It provides much better network performance than the SMSC_91C111 component, because it features host-assisted network acceleration. This means that it can offload packet processing operations from the simulated OS on the target, to the host side. These operations include checksum computation, tx packet segmentation, and rx packet combination. If the target simulated Linux or Linux-derived OS has an appropriate virtio net driver, Arm recommends you use VirtioNetMMIO instead of SMSC_91C111.

Unlike SMSC_91C111, which must work with an external HostBridge component, VirtioNetMMIO has a built-in HostBridge sub-component. The parameters to control the HostBridge are described in the VirtioNetMMIO parameters table, with the hostbridge parameter sub-namespace.

Setting up VirtioNetMMIO

Take the following steps to set up the component in a virtual platform:

  • Use a version of Linux that contains a virtio network driver.
  • Add the following option to the Linux kernel configuration:
    CONFIG_VIRTIO_NET=y
  • Update the device tree to include the VirtioNetMMIO component, or specify it on the kernel command line, as shown below. The address range for both VE and Base platforms is 0x1C1500000x1C15FFFF. The interrupt number is 44, or IRQ 76, for both VE and Base platforms.
  • Select the hostbridge that you want to use to communicate with the host in the model:
    virtio_net.hostbridge.userNetworking=true/false (User mode or TAP/TUN networking)
  • Configure the networking environment, as described in the related tasks, below.

Example kernel command-line argument:

virtio_mmio.device=0x10000@0x1c150000:76

Example entries for DTS files:

  • Add this entry next to the corresponding virtio_block or virtio_p9 entry:

    virtio_net@0150000 {
            compatible = "virtio,mmio";
            reg = <0x150000 0x1000>;
            interrupts = <0x2c>; 
    };
  • Add this entry to the interrupt map:

    <0 0 44 &gic 0 44 4>;

Table 3-259 Ports

Name Protocol Type Description
intr Signal Master Virtio device sets interrupt to signal completion.
pvbus PVBus Slave Virtio MMIO control/config/status registers.
virtio_m PVBus Master Virtio device performs DMA accesses via master.
Non-ConfidentialPDF file icon PDF version100964_1180_00_en
Copyright © 2014–2019 Arm Limited or its affiliates. All rights reserved.