- 07 5月, 2013 1 次提交
-
-
由 Jason Wang 提交于
Commit 32993698 (vhost: disable on tap link down) tries to disable the vhost also when the peer's link is down. But the check was not done properly, the vhost were only started when: 1) peer's link is not down 2) virtio-net has already been started. Since == have a higher precedence than &&, place a brace to make sure both the conditions were met then does the check. This fixes the crash when doing a savem after set the link off which let qemu crash and complains: virtio_net_save: Assertion `!n->vhost_started' failed. Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: NJason Wang <jasowang@redhat.com> Message-id: 1366972060-21606-1-git-send-email-jasowang@redhat.com Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 01 5月, 2013 1 次提交
-
-
由 Jason Wang 提交于
Commit 14f9b664 (hw/virtio-net.c: set config size using host features) tries to calculate config size based on the host features. But it forgets the VIRTIO_NET_F_MAC were always set for qemu later. This will lead a zero config len for virtio-net device when both VIRTIO_NET_F_STATUS and VIRTIO_NET_F_MQ were disabled form command line. Then qemu will crash when user tries to read the config of virtio-net. Fix this by counting VIRTIO_NET_F_MAC and make sure the config at least contains the mac address. Cc: Jesse Larrew <jlarrew@linux.vnet.ibm.com> Signed-off-by: NJason Wang <jasowang@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Acked-by: NMichael S. Tsirkin <mst@redhat.com> Message-id: 1366874814-2658-1-git-send-email-jasowang@redhat.com Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 29 4月, 2013 1 次提交
-
-
由 Jason Wang 提交于
Multiqueue patchset conditionally add control vq only when guest negotiate the feature. Though the spec is not clear on this but it breaks the minix guest since it will identify the ctrl vq even if it does not support it. Though this behavior seems a violation on the spec "If the VIRTIO_NET_F_CTRL_VQ feature bit is negotiated, identify the control virtqueue.", to keep the backward compatibility, always add the ctrl vq at end of the queues. Reported-by: NAurelien Jarno <aurelien@aurel32.net> Acked-by: NMichael S. Tsirkin <mst@redhat.com> Tested-by: NAurelien Jarno <aurelien@aurel32.net> Signed-off-by: NJason Wang <jasowang@redhat.com> Message-id: 1366874663-2566-1-git-send-email-jasowang@redhat.com Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 25 4月, 2013 2 次提交
-
-
由 KONRAD Frederic 提交于
This clean the init and the exit functions and rename virtio_common_cleanup to virtio_cleanup. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366791683-5350-7-git-send-email-fred.konrad@greensocs.com Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 KONRAD Frederic 提交于
This remove the function pointer in VirtIODevice, and use only VirtioDeviceClass function pointer. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366791683-5350-5-git-send-email-fred.konrad@greensocs.com Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 17 4月, 2013 3 次提交
-
-
由 KONRAD Frederic 提交于
This remove old init and exit function as they are no longer needed. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Tested-by: NCornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1365690602-22729-8-git-send-email-fred.konrad@greensocs.com Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 KONRAD Frederic 提交于
As the virtio-net-pci and virtio-net-s390 are switched to the new API, we can use QOM casts. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Tested-by: NCornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1365690602-22729-7-git-send-email-fred.konrad@greensocs.com Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 KONRAD Frederic 提交于
Create virtio-net-device which extends virtio-device, so it can be connected on virtio-bus. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Tested-by: NCornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1365690602-22729-3-git-send-email-fred.konrad@greensocs.com Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 09 4月, 2013 2 次提交
-
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Many of these should be cleaned up with proper qdev-/QOM-ification. Right now there are many catch-all headers in include/hw/ARCH depending on cpu.h, and this makes it necessary to compile these files per-target. However, fixing this does not belong in these patches. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 27 3月, 2013 1 次提交
-
-
由 Jason Wang 提交于
Following commit 921ac5d0 (virtio-net: remove layout assumptions for ctrl vq), this patch makes multiqueue ctrl handling not rely on the layout of descriptors. Signed-off-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 19 3月, 2013 1 次提交
-
-
由 KONRAD Frederic 提交于
These structures must be made public to avoid two memory allocations for refactored virtio devices. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NAndreas Färber <afaerber@suse.de> Message-id: 1363624648-16906-2-git-send-email-fred.konrad@greensocs.com Changes V4 <- V3: * Rebased on current git. Changes V3 <- V2: * Style correction spotted by Andreas (virtio-scsi.h). * Style correction for virtio-net.h. Changes V2 <- V1: * Move the dataplane include into the header (virtio-blk). Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 01 3月, 2013 1 次提交
-
-
由 Paolo Bonzini 提交于
Done with this script: cd hw for i in `find . -name '*.h' | sed 's/^..//'`; do echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,' done | sed -i -f - `find . -type f` This is so that paths remain valid as files are moved. Instead, files in hw/dataplane are referenced with the relative path. We know they are not going to move to include/, and they are the only include files that are in subdirectories _and_ move. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 27 2月, 2013 1 次提交
-
-
由 Jason Wang 提交于
Edivaldo reports a problem that the array of NetClientState in NICState is too large - MAX_QUEUE_NUM(1024) which will wastes memory even if multiqueue is not used. Instead of static arrays, solving this issue by allocating the queues on demand for both the NetClientState array in NICState and VirtIONetQueue array in VirtIONet. Tested by myself, with single virtio-net-pci device. The memory allocation is almost the same as when multiqueue is not merged. Cc: Edivaldo de Araujo Pereira <edivaldoapereira@yahoo.com.br> Cc: qemu-stable@nongnu.org Signed-off-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 09 2月, 2013 1 次提交
-
-
由 Jesse Larrew 提交于
Currently, the config size for virtio devices is hard coded. When a new feature is added that changes the config size, drivers that assume a static config size will break. For purposes of backward compatibility, there needs to be a way to inform drivers of the config size needed to accommodate the set of features enabled. aliguori: merged in - hw/virtio-net: use existing macros to implement endof - hw/virtio-net: fix config_size data type Signed-off-by: NJesse Larrew <jlarrew@linux.vnet.ibm.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 08 2月, 2013 1 次提交
-
-
由 Anthony Liguori 提交于
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 02 2月, 2013 8 次提交
-
-
由 Jason Wang 提交于
This patch add migration support for multiqueue virtio-net. Instead of bumping the version, we conditionally send the info of multiqueue only when the device support more than one queue to maintain the backward compatibility. Signed-off-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Jason Wang 提交于
This patch implements both userspace and vhost support for multiple queue virtio-net (VIRTIO_NET_F_MQ). This is done by introducing an array of VirtIONetQueue to VirtIONet. Signed-off-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Jason Wang 提交于
To support multiqueue virtio-net, the first step is to separate the virtqueue related fields from VirtIONet to a new structure VirtIONetQueue. The following patches will add an array of VirtIONetQueue to VirtIONet based on this patch. Signed-off-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Jason Wang 提交于
This patch lets vhost support multiqueue. The idea is simple, just launching multiple threads of vhost and let each of vhost thread processing a subset of the virtqueues of the device. After this change each emulated device can have multiple vhost threads as its backend. To do this, a virtqueue index were introduced to record to first virtqueue that will be handled by this vhost_net device. Based on this and nvqs, vhost could calculate its relative index to setup vhost_net device. Since we may have many vhost/net devices for a virtio-net device. The setting of guest notifiers were moved out of the starting/stopping of a specific vhost thread. The vhost_net_{start|stop}() were renamed to vhost_net_{start|stop}_one(), and a new vhost_net_{start|stop}() were introduced to configure the guest notifiers and start/stop all vhost/vhost_net devices. Signed-off-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Jason Wang 提交于
To support multiqueue nic, this patch separate the nic destructor from qemu_del_net_client() to a new helper qemu_del_nic() since the mapping bettween NiCState and NetClientState were not 1:1 in multiqueue. The following patches would refactor this function to support multiqueue nic. Signed-off-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Jason Wang 提交于
To support multiqueue, this patch introduces a helper qemu_get_nic() to get NICState from a NetClientState. The following patches would refactor this helper to support multiqueue. Signed-off-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Jason Wang 提交于
To support multiqueue, the patch introduce a helper qemu_get_queue() which is used to get the NetClientState of a device. The following patches would refactor this helper to support multiqueue. Signed-off-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Jason Wang 提交于
Signed-off-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 30 1月, 2013 4 次提交
-
-
由 Amos Kong 提交于
This patch makes rx commands consistent with specification. Signed-off-by: NAmos Kong <akong@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 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>
-
由 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: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NAmos Kong <akong@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
Once guest overrides virtio net primary mac, it retains the value set until qemu exit. This is inconsistent with standard nic behaviour. To fix, revert the mac to the original value on reset. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 08 1月, 2013 2 次提交
-
-
由 Michael S. Tsirkin 提交于
Support backend guest notifier masking in vhost-net: create eventfd at device init, when masked, make vhost use that as eventfd instead of sending an interrupt. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
As vhost started is cleared last thing on stop, set it first things on start. This makes it possible to use vhost_started while start is in progress which is used by follow-up patches. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 19 12月, 2012 2 次提交
-
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Move public headers to include/net, and leave private headers in net/. Put the virtio headers in include/net/tap.h, removing the multiple copies that existed. Leave include/net/tap.h as the interface for NICs, and net/tap_int.h as the interface for OS-specific parts of the tap backend. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 30 10月, 2012 8 次提交
-
-
由 Michael S. Tsirkin 提交于
Modern linux supports arbitrary header size, which makes it possible to pass mrg buf header to tap directly without iovec mangling. Use this capability when it is there. This removes the need to deal with it in vhost-net as we do now. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
There's no reason to query header support at random times: at load or feature query. Driver also might not query functions. Cleaner to do it at device init. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
During packet filtering, we can now use host hdr len to offset incoming buffer unconditionally. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
Remove code duplication using guest header length that we track. Drop specific layout requirement for rx buffers: things work using generic iovec functions in any case. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
Avoid mangling iovec manually: use safe iov_* functions. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
We know offset is 0, assert that. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
Now that we know host hdr length, we don't need to duplicate the logic in receive_hdr: caller can figure out the offset itself. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
Avoid magling iov manually: use safe iov operations for processing packets incoming to guest. This also removes the requirement for virtio header to fit the first s/g entry exactly. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-