All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 00/25] VMState cleanups and conversion of network drivers
Date: Mon, 19 Oct 2009 20:42:45 +0200	[thread overview]
Message-ID: <cover.1255976538.git.quintela@redhat.com> (raw)

Hi

This series cleans VMState internals and port all the pc network devices to
VMState (except virtio-net).
- Cleanups:
 * we can send partial buffers, and clean how we do it
 * refactor all the buffer code.
 * refactor all the offset code
 * add VARRAY_UINT16_UNSAFE: unsafe here means that type checking is off
   (a.k.a. as a cast in C).  In this case the problem is that the last
   element of one struct is int foo[0], and we allocate the right size
   for the array we want.  Problem?  I haven't been able to abuse^Wuse
   gcc + cpp + magic to typecheck that for vmstate:

   We have
   struct FOO {
   	  int32_t foo[0];
   }
   We want to "compare the type of foo (t1) with int32_t (t2)

        ((t1(*)[n])0 - (t2*)0)
   This one don't work, because we don't have 'n'
        ((t1(**))0 - (t2*)0)
   This don't work either because t1 is one array.
        ((t1(*)[])0 - (t2*)0)
   Too clever, imposible cast to on array type.
   I tried some other variants, but have not able to get one that compiles.
 * UNUSED support.  This allows to mark some space in the VMStateDescription
   as "useless", that is there for backwards compatibility.  We don't need
   a field in the State to load/save that values anymore.
 * SUB_ARRAY(..,start, num, ...)
   This allows us to send only slices of one array, i.e. 'num' elemns starting
   at position 'start'.
- Network Devices
 * rtl8139; Drop support for version < 3, it don't work as non-pci anymore.
 * eeprom93xx (only used by eepro100), this one was quite "interesting"
   - savevm state had pading by design
   - size field changed from 8 bits to 16 bits using the pading space
   - VMARRAY with size uint16_t and UNSAFE was needed for this driver
   - Wint the price of the more complicated conversion of the series.
 * eepro100:
   - really, really needed the UNUSED support
   - it is the only driver so far that uses a different "name"
 * pcnet: nothing special, just port
 * ne2000: nothing special, just port
 * e1000: after I understood the mac_reg*save arrays just
   - unfold them
   - save them as SUB_ARRAY
   result is clear that previous code.

Reason why cleanup + devices came together is because the cleanups/additons
are needed to implement this devices.

Comments?

Later, Juan.


Juan Quintela (25):
  vmstate: Add support for partial buffers transmission
  serial: use post_load version_id field and remove pre_load function
  vnmstate: fix name for uint8_equal
  vmstate: add VMSTATE_UINT16_EQUAL[_V]
  vmstate: Rename VMS_VARRAY to VMS_VARRAY_INT32
  vmstate: fix indentation
  vmstate: factor vmstate_offset_value
  vmstate: factor vmstate_offset_pointer
  vmstate: factor vmstate_offset_array
  vmstate: factor vmstate_offset_buffer
  vmstate: factor VMSTATE_*BUFFER* definitions
  vmstate: Unfold VMSTATE_INT32_VARRAY() only use and remove it
  vmstate: add VMS_VARRAY_UINT16_UNSAFE (varrays with uint16 indexes)
  vmstate: Add version arg to VMSTATE_SINGLE_TEST()
  vmstate: Add VMSTATE_BUFFER_UNUSED
  vmstate: Introduce the concept of sub-arrays
  rtl8139: port TallyCounters to vmstate
  rtl8139: port to vmstate
  eeprom93xx: port to vmstate
  eepro100: port to vmstate
  pcnet: port to vmstate
  ne2000: port to vmstate
  e1000: unfold mac_reg_tosave array
  e1000: unfold mac_regarraystosave array
  e1000: port to vmstate

 hw/e1000.c            |  185 ++++++++++++---------------
 hw/eepro100.c         |  195 +++++++++-------------------
 hw/eeprom93xx.c       |  102 +++++++--------
 hw/fdc.c              |    2 +-
 hw/hw.h               |  171 +++++++++++++++---------
 hw/ne2000-isa.c       |    4 +-
 hw/ne2000.c           |  133 +++++++------------
 hw/ne2000.h           |    3 +-
 hw/pci.c              |    2 +-
 hw/pcnet.c            |  110 ++++++----------
 hw/rtl8139.c          |  347 +++++++++++++++----------------------------------
 hw/serial.c           |   11 +-
 savevm.c              |   54 +++++++-
 target-i386/machine.c |    2 +-
 14 files changed, 548 insertions(+), 773 deletions(-)

             reply	other threads:[~2009-10-19 18:43 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-19 18:42 Juan Quintela [this message]
2009-10-19 18:42 ` [Qemu-devel] [PATCH 01/25] vmstate: Add support for partial buffers transmission Juan Quintela
2009-10-19 18:42 ` [Qemu-devel] [PATCH 02/25] serial: use post_load version_id field and remove pre_load function Juan Quintela
2009-10-19 18:42 ` [Qemu-devel] [PATCH 03/25] vnmstate: fix name for uint8_equal Juan Quintela
2009-10-19 18:42 ` [Qemu-devel] [PATCH 04/25] vmstate: add VMSTATE_UINT16_EQUAL[_V] Juan Quintela
2009-10-19 18:42 ` [Qemu-devel] [PATCH 05/25] vmstate: Rename VMS_VARRAY to VMS_VARRAY_INT32 Juan Quintela
2009-10-19 18:42 ` [Qemu-devel] [PATCH 06/25] vmstate: fix indentation Juan Quintela
2009-10-19 18:42 ` [Qemu-devel] [PATCH 07/25] vmstate: factor vmstate_offset_value Juan Quintela
2009-10-19 18:42 ` [Qemu-devel] [PATCH 08/25] vmstate: factor vmstate_offset_pointer Juan Quintela
2009-10-19 18:42 ` [Qemu-devel] [PATCH 09/25] vmstate: factor vmstate_offset_array Juan Quintela
2009-10-19 18:42 ` [Qemu-devel] [PATCH 10/25] vmstate: factor vmstate_offset_buffer Juan Quintela
2009-10-19 18:42 ` [Qemu-devel] [PATCH 11/25] vmstate: factor VMSTATE_*BUFFER* definitions Juan Quintela
2009-10-19 18:42 ` [Qemu-devel] [PATCH 12/25] vmstate: Unfold VMSTATE_INT32_VARRAY() only use and remove it Juan Quintela
2009-10-19 18:42 ` [Qemu-devel] [PATCH 13/25] vmstate: add VMS_VARRAY_UINT16_UNSAFE (varrays with uint16 indexes) Juan Quintela
2009-10-19 18:42 ` [Qemu-devel] [PATCH 14/25] vmstate: Add version arg to VMSTATE_SINGLE_TEST() Juan Quintela
2009-10-19 18:43 ` [Qemu-devel] [PATCH 15/25] vmstate: Add VMSTATE_BUFFER_UNUSED Juan Quintela
2009-10-19 18:43 ` [Qemu-devel] [PATCH 16/25] vmstate: Introduce the concept of sub-arrays Juan Quintela
2009-10-19 18:43 ` [Qemu-devel] [PATCH 17/25] rtl8139: port TallyCounters to vmstate Juan Quintela
2009-10-19 18:43 ` [Qemu-devel] [PATCH 18/25] rtl8139: port " Juan Quintela
2009-10-19 18:43 ` [Qemu-devel] [PATCH 19/25] eeprom93xx: " Juan Quintela
2009-10-19 18:43 ` [Qemu-devel] [PATCH 20/25] eepro100: " Juan Quintela
2009-10-19 18:43 ` [Qemu-devel] [PATCH 21/25] pcnet: " Juan Quintela
2009-10-19 18:43 ` [Qemu-devel] [PATCH 22/25] ne2000: " Juan Quintela
2009-10-19 18:43 ` [Qemu-devel] [PATCH 23/25] e1000: unfold mac_reg_tosave array Juan Quintela
2009-10-19 18:43 ` [Qemu-devel] [PATCH 24/25] e1000: unfold mac_regarraystosave array Juan Quintela
2009-10-19 18:43 ` [Qemu-devel] [PATCH 25/25] e1000: port to vmstate Juan Quintela
2009-10-19 19:15 ` [Qemu-devel] [PATCH 00/25] VMState cleanups and conversion of network drivers Jamie Lokier
2009-10-19 20:34   ` [Qemu-devel] " Juan Quintela
2009-10-19 21:11     ` Jamie Lokier
2009-10-20 15:41   ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1255976538.git.quintela@redhat.com \
    --to=quintela@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.