Skip to content

virtio: port to vmstate

Juan Quintela qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest41 patches 54 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/41virtio: Teach virtio-balloon about DO_UPCASThw/virtio-balloon.c+3 -81 reply
2/41virtio: Teach virtio-blk about DO_UPCASThw/virtio-blk.c+3 -80 replies
3/41virtio: Teach virtio-console about DO_UPCASThw/virtio-console.c+1 -60 replies
4/41virtio: Teach virtio-net about DO_UPCASThw/virtio-net.c+8 -130 replies
5/41virtio-console: Remove useless castshw/virtio-console.c+2 -20 replies
6/41virtio: Use DO_UPCAST instead of a casthw/virtio-balloon.c hw/virtio-blk.c hw/virtio-console.c +1 more+12 -1111 replies
7/41virtio-pci: Remove duplicate testhw/msix.c hw/virtio-pci.c+4 -110 replies
8/41msix: Store sizes that we send/receivehw/msix.c hw/pci.h+11 -41 reply
9/41msix: port to vmstatehw/msix.c hw/msix.h+33 -70 replies
10/41qemu/pci: document msix_entries_nr fieldhw/pci.h+3 -10 replies
11/41virtio: Introduce type field to distingish between PCI and Syborghw/syborg_virtio.c hw/virtio-pci.c hw/virtio.h+8 -11 reply
12/41virtio-pci: port pci config to vmstatehw/virtio-pci.c+50 -221 reply
13/41msix: msix_load/save are not needed anymorehw/msix.c hw/msix.h+0 -130 replies
14/41virtio: remove save/load_config for virtiohw/virtio-pci.c hw/virtio.c hw/virtio.h+8 -190 replies
15/41virtio: remove save/load_queue for virtiohw/virtio-pci.c hw/virtio.c hw/virtio.h+24 -265 replies
16/41virtio: Add num_pci_queues fieldhw/virtio.c hw/virtio.h+21 -131 reply
17/41virtio: split virtio_post_load() from virtio_load()hw/virtio.c+29 -160 replies
18/41virtio: change config_len type to int32_thw/virtio.c hw/virtio.h+3 -30 replies
19/41virtio: use the right types for VirtQueue elementshw/virtio.c+4 -43 replies
20/41virtio: abstract test for save/load valueshw/virtio.c+20 -71 reply
21/41virtio: port to vmstatehw/hw.h hw/virtio.c hw/virtio.h+81 -551 reply
22/41virtio-net: change tx_timer_active to uint32_thw/virtio-net.c+3 -30 replies
23/41virtio-net: change mergeable_rx_bufs to uint32_thw/virtio-net.c+3 -30 replies
24/41virtio-net: use type checking version of qemu_put/get-*hw/virtio-net.c+21 -200 replies
25/41virtio-net: MAC_TABLE_ENTRIES has never been biggerhw/virtio-net.c+4 -90 replies
26/41virtio-net: we know vlans size at compile time, make it statichw/virtio-net.c+1 -40 replies
27/41virtio-net: abstract vlans operationshw/virtio-net.c+18 -34 replies
28/41virtio-net: make vlan operations on uint8_t, not uint32_thw/virtio-net.c+6 -61 reply
29/41virtio-net: in_use and first_multi only handle unsigned valueshw/virtio-net.c+4 -45 replies
30/41virtio-net: use save/load type chek functions for has_vent_hdrhw/virtio-net.c+3 -20 replies
31/41virtio-net: we know macs size at compile time, make it statichw/virtio-net.c+1 -53 replies
32/41virtio-net: split virtio_net_post_loadhw/virtio-net.c+46 -330 replies
33/41virtio-net: port to vmstatehw/virtio-net.c+64 -848 replies
34/41virtio-console: port to vmstatehw/virtio-console.c+11 -180 replies
35/41virtio-balloon: port to vmstatehw/virtio-balloon.c+13 -250 replies
36/41virtio-blk: change rq type to VirtIOBlockReqhw/virtio-blk.c+5 -30 replies
37/41QLIST: Introduce QLIST_COPY_HEADqemu-queue.h+4 -00 replies
38/41virtio-blk: use QLIST for the list of requestshw/virtio-blk.c+14 -153 replies
39/41virtio-blk: add VirtIOBlokReqHead typehw/virtio-blk.c+2 -10 replies
40/41virtio-blk: port to vmstatehw/virtio-blk.c+37 -132 replies
41/41virtio: virtio_save/load are not used anymorehw/virtio.c hw/virtio.h+0 -142 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 00/41] virtio: port to vmstate

Hi

this patch series run on top of my previous vmstate cleanups and fixes. It ports virtio* and msix at the same time (msix and virtio-pci are too entangled to do it separately). It contains:

- Use DO_UPCAST instead of local function for doing the casts
- virtio: add a type field (pci and syborg by now).
- strange pci bindings for virtio are gone (i.e. config and queues are handled explicitely for pci, the ones that used them).
- virtio-net: make vlans to use uint8_t instead of uint32_t array, that makes it work through big_endian/low endian migrations. This needs testing from people that use the feature.
- virtio-blk: It has no hope for migration between 32/64bits hosts or big-endian/little-endian. It sends a structure with memcpy that contains:
- target_phys_addr_t (32 or 64 bits depending on host/guest)
- void * (again it depends on host)
- size_t (it depends on host again)
I didn't changed it, but we should.
- virtio-blk: change the list of requests to QLIST. I also needed a QLIST_COPY_HEAD to not have to break the abstraction, created it.

Later, Juan.

Juan Quintela (40):
virtio: Teach virtio-balloon about DO_UPCAST
virtio: Teach virtio-blk about DO_UPCAST
virtio: Teach virtio-console about DO_UPCAST
virtio: Teach virtio-net about DO_UPCAST
virtio-console: Remove useless casts
virtio: Use DO_UPCAST instead of a cast
virtio-pci: Remove duplicate test
msix: Store sizes that we send/receive
msix: port to vmstate
virtio: Introduce type field to distingish between PCI and Syborg
virtio-pci: port pci config to vmstate
msix: msix_load/save are not needed anymore
virtio: remove save/load_config for virtio
virtio: remove save/load_queue for virtio
virtio: Add num_pci_queues field
virtio: split virtio_post_load() from virtio_load()
virtio: change config_len type to int32_t
virtio: use the right types for VirtQueue elements
virtio: abstract test for save/load values
virtio: port to vmstate
virtio-net: change tx_timer_active to uint32_t
virtio-net: change mergeable_rx_bufs to uint32_t
virtio-net: use type checking version of qemu_put/get-*
virtio-net: MAC_TABLE_ENTRIES has never been bigger
virtio-net: we know vlans size at compile time, make it static
virtio-net: abstract vlans operations
virtio-net: make vlan operations on uint8_t, not uint32_t
virtio-net: in_use and first_multi only handle unsigned values
virtio-net: use save/load type chek functions for has_vent_hdr
virtio-net: we know macs size at compile time, make it static
virtio-net: split virtio_net_post_load
virtio-net: port to vmstate
virtio-console: port to vmstate
virtio-balloon: port to vmstate
virtio-blk: change rq type to VirtIOBlockReq
QLIST: Introduce QLIST_COPY_HEAD
virtio-blk: use QLIST for the list of requests
virtio-blk: add VirtIOBlokReqHead type
virtio-blk: port to vmstate
virtio: virtio_save/load are not used anymore

Michael S. Tsirkin (1):
qemu/pci: document msix_entries_nr field

 hw/hw.h             |   10 +++
 hw/msix.c           |   37 ++++++---
 hw/msix.h           |    3 +-
 hw/pci.h            |    6 +-
 hw/syborg_virtio.c  |    1 +
 hw/virtio-balloon.c |   53 +++++---------
 hw/virtio-blk.c     |  101 +++++++++++++++----------
 hw/virtio-console.c |   43 ++++-------
 hw/virtio-net.c     |  207 +++++++++++++++++++++++++--------------------------
 hw/virtio-pci.c     |   80 ++++++++++---------
 hw/virtio.c         |  138 ++++++++++++++++++++++------------
 hw/virtio.h         |   24 ++++--
 qemu-queue.h        |    4 +
 13 files changed, 390 insertions(+), 317 deletions(-)