[Qemu-devel] [PATCH v4 2/3] net: split eth_mac_addr for better error handling

2013-01-19 Thread akong
From: Stefan Hajnoczi When we set mac address, software mac address in system and hardware mac address all need to be updated. Current eth_mac_addr() doesn't allow callers to implement error handling nicely. This patch split eth_mac_addr() to prepare part and real commit part, then we can prepar

[Qemu-devel] [PATCH v4 0/3] make mac programming for virtio net more robust

2013-01-19 Thread akong
From: Amos Kong Currenly mac is programmed byte by byte. This means that we have an intermediate step where mac is wrong. Third patch introduced a new vq control command to set mac address, it's atomic. V2: check return of sending command, delay eth_mac_addr() V3: restore software address when

[Qemu-devel] [PATCH v4 1/3] move virtnet_send_command() above virtnet_set_mac_address()

2013-01-19 Thread akong
From: Amos Kong We want to send vq command to set mac address in virtnet_set_mac_address(), so do this function moving. Fixed a little issue of coding style. Signed-off-by: Amos Kong --- drivers/net/virtio_net.c | 89 1 file changed, 44 insertio

[Qemu-devel] [PATCH v4 3/3] virtio-net: introduce a new control to set macaddr

2013-01-19 Thread akong
From: Amos Kong 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. Signe

[Qemu-devel] [QEMU PATCH v4 3/3] virtio-net: rename ctrl rx commands

2013-01-18 Thread akong
From: Amos Kong This patch makes rx commands consistent with specification. Signed-off-by: Amos Kong --- hw/virtio-net.c | 14 +++--- hw/virtio-net.h | 14 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index cf40ff2..5

[Qemu-devel] [QEMU PATCH v4 2/3] virtio-net: introduce a new macaddr control

2013-01-18 Thread akong
From: 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 b

[Qemu-devel] [QEMU PATCH v4 1/3] virtio-net: remove layout assumptions for ctrl vq

2013-01-18 Thread akong
From: "Michael S. Tsirkin" Virtio-net code makes assumption about virtqueue descriptor layout (e.g. sg[0] is the header, sg[1] is the data buffer). This patch makes code not rely on the layout of descriptors. Signed-off-by: Michael S. Tsirkin Signed-off-by: Amos Kong --- hw/virtio-net.c | 12

[Qemu-devel] [QEMU PATCH v4 0/3] virtio-net: fix of ctrl commands

2013-01-18 Thread akong
From: Amos Kong Currently virtio-net code relys on the layout of descriptor, this patchset removed the assumptions and introduced a control command to set mac address. Last patch is a trivial renaming. V2: check guest's iov_len V3: fix of migration compatibility make mac field in config spac

[Qemu-devel] [PATCH v3 0/2] make mac programming for virtio net more robust

2013-01-17 Thread akong
From: Amos Kong Currenly mac is programmed byte by byte. This means that we have an intermediate step where mac is wrong. Second patch introduced a new vq control command to set mac address, it's atomic. V2: check return of sending command, delay eth_mac_addr() V3: restore software address whe

[Qemu-devel] [PATCH v3 2/2] virtio-net: introduce a new control to set macaddr

2013-01-17 Thread akong
From: Amos Kong 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. Signe

[Qemu-devel] [PATCH v3 1/2] move virtnet_send_command() above virtnet_set_mac_address()

2013-01-17 Thread akong
From: Amos Kong We will send vq command to set mac address in virtnet_set_mac_address() a little fix of coding style Signed-off-by: Amos Kong --- drivers/net/virtio_net.c | 89 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/driv

[Qemu-devel] [QEMU PATCH v3] virtio-net: introduce a new macaddr control

2013-01-17 Thread akong
From: 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 b

[Qemu-devel] [QEMU PATCH v2] virtio-net: introduce a new macaddr control

2013-01-15 Thread akong
From: 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 in one time. VIRTIO_NET_F_CTRL_MAC_ADDR is a new feature bi

[Qemu-devel] [PATCH v2 1/2] move virtnet_send_command() above virtnet_set_mac_address()

2013-01-15 Thread akong
From: Amos Kong We will send vq command to set mac address in virtnet_set_mac_address() a little fix of coding style Signed-off-by: Amos Kong --- drivers/net/virtio_net.c | 89 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/driv

[Qemu-devel] [PATCH v2 2/2] virtio-net: introduce a new control to set macaddr

2013-01-15 Thread akong
From: Amos Kong 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 in one time. VIRTIO_NET_F_CTRL_MAC_ADDR is a new feature bit for compatibility. Signed

[Qemu-devel] [PATCH v2 0/2] make mac programming for virtio net more robust

2013-01-15 Thread akong
From: Amos Kong Currenly mac is programmed byte by byte. This means that we have an intermediate step where mac is wrong. Second patch introduced a new vq control command to set mac address in one time. V2: check return of sending command, delay eth_mac_addr() Amos Kong (2): move virtnet_se

[Qemu-devel] [RFC PATCH 2/2] virtio-net: introduce a new control to set macaddr

2013-01-10 Thread akong
From: Amos Kong 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 in one time. VIRTIO_NET_F_CTRL_MAC_ADDR is a new feature bit for compatibility. Signed

[Qemu-devel] [RFC PATCH] virtio-net: introduce a new macaddr control

2013-01-10 Thread akong
From: 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 in one time. VIRTIO_NET_F_CTRL_MAC_ADDR is a new feature bi

[Qemu-devel] [RFC PATCH 1/2] move virtnet_send_command() above virtnet_set_mac_address()

2013-01-10 Thread akong
From: Amos Kong We will send vq command to set mac address in virtnet_set_mac_address() a little fix of coding style Signed-off-by: Amos Kong --- drivers/net/virtio_net.c | 89 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/driv

[Qemu-devel] [RFC PATCH 0/2] make mac programming for virtio net more robust

2013-01-10 Thread akong
From: Amos Kong Currenly mac is programmed byte by byte. This means that we have an intermediate step where mac is wrong. Second patch introduced a new vq control command to set mac address in one time. Amos Kong (2): move virtnet_send_command() above virtnet_set_mac_address() virtio-net:

[Qemu-devel] [PATCH v2] vnc: add a more descriptive error message

2012-06-29 Thread akong
From: Amos Kong Currently qemu outputs some low-level error in qemu-sockets.c when failed to start vnc server. eg. 'getaddrinfo(127.0.0.1,5902): Name or service not known' Some libvirt users could not know what's happened with this unclear error message. This patch added a more descriptive error

[Qemu-devel] [PATCH] vnc: add a more descriptive error message

2012-06-29 Thread akong
From: Amos Kong Currently qemu would some low-level error in qemu-sockets.c when failed to start vnc server. eg. 'getaddrinfo(127.0.0.1,5902): Name or service not known' This patch added a more descriptive error message. Signed-off-by: Amos Kong --- vl.c |5 - 1 file changed, 4 insert

[Qemu-devel] [PATCH] Virtio-net: Replace the hardcode 6 with defined ETN_ALEN

2010-05-22 Thread akong
From: Amos Kong hw/virtio-net.h: #define ETH_ALEN6 ETH_ALEN was defined by commit 7967406801aa897fae83caad3278ac85a342adaa Signed-off-by: Amos Kong --- hw/virtio-net.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/virtio-net.h b/hw/virtio-net.h index e5