mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
virtio-net: introduce a new macaddr control
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: Amos Kong <akong@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
921ac5d0f3
commit
c1943a3f37
3 changed files with 26 additions and 3 deletions
|
@ -309,6 +309,10 @@ static QEMUMachine pc_i440fx_machine_v1_4 = {
|
|||
.driver = "usb-tablet",\
|
||||
.property = "usb_version",\
|
||||
.value = stringify(1),\
|
||||
},{\
|
||||
.driver = "virtio-net-pci",\
|
||||
.property = "ctrl_mac_addr",\
|
||||
.value = "off", \
|
||||
}
|
||||
|
||||
static QEMUMachine pc_machine_v1_3 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue