qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, peter.maydell@linaro.org, aliguori@us.ibm.com,
	quintela@redhat.com, blauwirbel@gmail.com, pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH 00/29] QIDL: First Batch of Device Conversions
Date: Thu,  1 Nov 2012 08:04:02 -0500	[thread overview]
Message-ID: <1351775071-7644-1-git-send-email-mdroth@linux.vnet.ibm.com> (raw)

These patches are based are qidl-base-v6, and can also be obtained from:

git://github.com/mdroth/qemu.git qidl-conv1-v1

This adds QIDL declarations/annotations and QOM state properties for the
following devices (with their default path assignments for a basic QEMU
invocation):

            PCI: /machine/i440fx/pci.0/state
      piix3-ide: /machine/unattached/device[22]/state
    mc146818rtc: /machine/unattached/device[11]/state
           hpet: /machine/unattached/device[10]/state
     cirrus-vga: /machine/unattached/device[9]/state
          PIIX3: /machine/unattached/device[6]/state
         i440FX: /machine/unattached/device[5]/state
     pci-bridge: /machine/peripheral-anon/device[0]/state

This serialized state information will eventually be used as an
intermediate, dynamic (via QObject) representation of device state to
allow for arbitrary manipulations of state representation during migration
(post-serialize for outgoing, pre-deserialization for incoming). A future
series will teach VMState how to map it's existing struct fields/offsets
to fields within these dynamic state objects to fully de-couple the
migration wire protocol from our internal representations of device state.
Future wire protocols can also potentially make use of this framework.

What to expect from this:

For now, we put these annotations in place to facilitate the practice of
properly marking guest state as immutable/derived/etc. By default, we
assume state is mutable and attempt to serialize it. This can cause
build breakage for developers modifying converted devices structures
as the QIDL parser is not currently capable of parsing all types of
declarations it encounters, and in some cases how to parse something
is inherantly ambiguous and requires input from the developer
(requiring a q_size()/q_immutable/q_derived marker for a uint32_t*, for
instance). The risk here is mostly on the build side, however, as the
state properties we generate are not yet in any critical path. As the
parser becomes more mature these situations will lesson, and we can
potentially make the parser smarter about anticipating such situations
and providing useful steps on how to fix them to minimize the impact to
normal development.

The plan is to get all standard PC devices converted over and make
migration capable of utilizing serialized state by 1.4, ideally starting
with 1.3, if that seems reasonable.

 Makefile            |    3 ++-
 hw/cirrus_vga.c     |   72 ++++++++++++++++++++++++++++++++++++++++++++-------
 hw/hpet.c           |   40 +++++++++++++++++++++++-----
 hw/ide/core.c       |   12 +++++++--
 hw/ide/internal.h   |   69 +++++++++++++++++++++++++++---------------------
 hw/ide/isa.c        |   39 ++++++++++++++++++++++++++--
 hw/ide/pci.c        |    9 +++++--
 hw/ide/pci.h        |   31 +++++++++++++---------
 hw/ide/piix.c       |   39 ++++++++++++++++++++++++++++
 hw/ide/qdev.c       |    2 ++
 hw/isa-bus.c        |    4 +++
 hw/isa.h            |    3 ++-
 hw/mc146818rtc.c    |   49 +++++++++++++++++++++++++----------
 hw/msix.c           |   12 ++++++---
 hw/pci.c            |   40 +++++++++++++++++++---------
 hw/pci.h            |   54 ++++++++++++++++++++++----------------
 hw/pci_bridge.c     |    4 +++
 hw/pci_bridge_dev.c |   35 +++++++++++++++++++++++--
 hw/pci_internals.h  |   36 ++++++++++++++------------
 hw/piix_pci.c       |   66 +++++++++++++++++++++++++++++++++++++++++-----
 hw/shpc.c           |   42 ++++++++++++++++++------------
 hw/shpc.h           |   17 +++++++-----
 hw/vga_int.h        |   25 ++++++++++--------
 qemu-timer.c        |   29 +++++++++++++++++++++
 qemu-timer.h        |    4 +++
 qidl.h              |    6 +++++
 26 files changed, 565 insertions(+), 177 deletions(-)

             reply	other threads:[~2012-11-01 13:04 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-01 13:04 Michael Roth [this message]
2012-11-01 13:04 ` [Qemu-devel] [PATCH 01/29] qemu-timer: add QEMUTimer visitor Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 02/29] qidl: qidl.h, mark common immutable types as q_immutable by default Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 03/29] isa: qidl_declare ISADevice Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 04/29] rtc: qidl_declare RTCState Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 05/29] rtc: use qidl-generated properties Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 06/29] rtc: add qom property for RTCState state Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 07/29] pci: qidl_declare PCIDevice + PCIBus Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 08/29] pci: use qidl_declare'd properties for TYPE_PCI_DEVICE Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 09/29] pci: add qom property for PCIBus instances Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 10/29] vga: qidl_declare VGACommonState Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 11/29] cirrus: qidl_declare PCICirrusVGAState + CirrusVGAState Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 12/29] cirrus: add qom property for cirrus-vga state Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 13/29] cirrus: qidl_declare ISACirrusVGAState Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 14/29] cirrus: add qom property for isa-cirrus-vga Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 15/29] i440fx: qidl_declare PCII440FXState Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 16/29] i440fx: a qom property for i440FX state Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 17/29] piix3: qidl_declare PIIX3State Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 18/29] piix3: add qom property for PIIX3 state Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 19/29] shpc: qidl_declare SHPCDevice Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 20/29] pci_bridge: qidl_declare PCIBridge Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 21/29] pci_bridge_dev: qidl_declare PCIBridgeDev Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 22/29] pci_bridge_dev: add qom property for pci-bridge state Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 23/29] ide: qidl_declare IDEBus + IDEState + IDEDevice Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 24/29] ide: qidl_declare ISAIDEState Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 25/29] ide: add qom property for isa-ide state Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 26/29] ide: qidl_declare BMDMAState + PCIIDEState Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 27/29] ide: add qom property for piix3/piix4-ide state Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 28/29] hpet: qidl_declare HPETState + HPETTimer Michael Roth
2012-11-01 13:04 ` [Qemu-devel] [PATCH 29/29] hpet: add qom property for hpet state Michael Roth

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=1351775071-7644-1-git-send-email-mdroth@linux.vnet.ibm.com \
    --to=mdroth@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).