• A
    virtio-net: introduce a new macaddr control · c1943a3f
    Amos Kong 提交于
    In virtio-net guest driver, currently we write MAC address to
    pci config space byte by byte, this means that we have an
    intermediate step where mac is wrong. This patch introduced
    a new control command to set MAC address, it's atomic.
    
    VIRTIO_NET_F_CTRL_MAC_ADDR is a new feature bit for compatibility.
    
    "mac" field will be set to read-only when VIRTIO_NET_F_CTRL_MAC_ADDR
    is acked.
    Signed-off-by: NAmos Kong <akong@redhat.com>
    Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
    c1943a3f
virtio-net.c 33.7 KB