On Thu, Jan 17, 2013 at 06:30:46PM +0800, ak...@redhat.com wrote: > From: Amos Kong <ak...@redhat.com> > > 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 <ak...@redhat.com> > --- > V2: check guest's iov_len > V3: fix of migration compatibility > make mac field in config space read-only when new feature is acked > --- > hw/pc_piix.c | 4 ++++ > hw/virtio-net.c | 10 +++++++++- > hw/virtio-net.h | 12 ++++++++++-- > 3 files changed, 23 insertions(+), 3 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>