qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] a90db1: target-ppc: Convert ppc cpu savevm to


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] a90db1: target-ppc: Convert ppc cpu savevm to VMStateDescr...
Date: Mon, 29 Jul 2013 10:00:11 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: a90db1584a00dc1d1439dc7729d99674b666b85e
      
https://github.com/qemu/qemu/commit/a90db1584a00dc1d1439dc7729d99674b666b85e
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M target-ppc/cpu-qom.h
    M target-ppc/cpu.h
    M target-ppc/machine.c
    M target-ppc/translate_init.c

  Log Message:
  -----------
  target-ppc: Convert ppc cpu savevm to VMStateDescription

The savevm code for the powerpc cpu emulation is currently based around
the old register_savevm() rather than register_vmstate() method.  It's also
rather broken, missing some important state on some CPU models.

This patch completely rewrites the savevm for target-ppc, using the new
VMStateDescription approach.  Exactly what needs to be saved in what
configurations has been more carefully examined, too.  This introduces a
new version (5) of the cpu save format.  The old load function is retained
to support version 4 images.

Signed-off-by: David Gibson <address@hidden>
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-id: address@hidden
[aik: ppc cpu savevm convertion fixed to use PowerPCCPU instead of CPUPPCState]
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: b368a7d864d6f32caba4ac9fb3b9738d1180315d
      
https://github.com/qemu/qemu/commit/b368a7d864d6f32caba4ac9fb3b9738d1180315d
  Author: David Gibson <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M hw/ppc/spapr_vio.c
    M include/hw/ppc/spapr_vio.h

  Log Message:
  -----------
  pseries: savevm support for VIO devices

This patch adds helpers to allow PAPR VIO devices to save state common
to all VIO devices during savevm.

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Anthony Liguori <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 686fefe48375c448bc2141973008818cd9b9c671
      
https://github.com/qemu/qemu/commit/686fefe48375c448bc2141973008818cd9b9c671
  Author: David Gibson <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M hw/net/spapr_llan.c

  Log Message:
  -----------
  pseries: savevm support for PAPR VIO logical lan

This patch adds the necessary VMStateDescription information to support
savevm/loadvm for the spapr_llan (PAPR logical lan) device.

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Anthony Liguori <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: db1b58e937fd80513a4bb14432808495a5846ffe
      
https://github.com/qemu/qemu/commit/db1b58e937fd80513a4bb14432808495a5846ffe
  Author: David Gibson <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M hw/char/spapr_vty.c

  Log Message:
  -----------
  pseries: savevm support for PAPR VIO logical tty

This patch adds the necessary VMStateDescription information to support
savevm/loadvm for the spapr_tty (PAPR logical serial) device.

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Anthony Liguori <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: a83000f5e3fac30a7f213af1ba6a8f827622854d
      
https://github.com/qemu/qemu/commit/a83000f5e3fac30a7f213af1ba6a8f827622854d
  Author: Anthony Liguori <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M hw/ppc/spapr.c
    M hw/ppc/spapr_iommu.c
    M hw/ppc/spapr_pci.c
    M hw/ppc/spapr_vio.c
    M include/hw/ppc/spapr.h
    M target-ppc/kvm.c

  Log Message:
  -----------
  spapr-tce: make sPAPRTCETable a proper device

Model TCE tables as a device that's hooked up as a child object to
the owner.  Besides the code cleanup, we get a few nice benefits:

1) free actually works now (it was dead code before)

2) the TCE information is visible in the device tree

3) we can expose table information as properties such that if we
   change the window_size, we can use globals to keep migration
   working.

Signed-off-by: David Gibson <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-id: address@hidden
[dwg: pseries: savevm support for PAPR TCE tables]
Signed-off-by: Alexey Kardashevskiy <address@hidden>
[alexey: ppc kvm: fix to compile]
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 8ca8a17c9a16eb3b2fedb3c74687c429e9cfc6aa
      
https://github.com/qemu/qemu/commit/8ca8a17c9a16eb3b2fedb3c74687c429e9cfc6aa
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M hw/scsi/spapr_vscsi.c

  Log Message:
  -----------
  pseries: rework PAPR virtual SCSI

The patch reimplements handling of indirect requests in order to
simplify upcoming live migration support.
- all pointers (except SCSIRequest*) were replaces with integer
indexes and offsets;
- DMA'ed srp_direct_buf kept untouched (ie. BE format);
- vscsi_fetch_desc() is added, now it is the only place where
descriptors are fetched and byteswapped;
- vscsi_req struct fields converted to migration-friendly types;
- many dprintf()'s fixed.

This also removed an unused field 'lun' from the spapr_vscsi device
which is assigned, but never used.  So, remove it.

[David Gibson: removed unused 'lun']
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 1168ec7da182d417125d9dea46908c0cfa2c40b7
      
https://github.com/qemu/qemu/commit/1168ec7da182d417125d9dea46908c0cfa2c40b7
  Author: David Gibson <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M hw/scsi/spapr_vscsi.c

  Log Message:
  -----------
  pseries: savevm support for PAPR virtual SCSI

This patch adds the necessary support for saving the state of the PAPR VIO
virtual SCSI device. This also saves and restores active SCSI requests.

[aik: implemented vscsi_req save/restore]
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-id: address@hidden
Cc: David Gibson <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 4be21d561d59da9d6f20f872882652bc3561f871
      
https://github.com/qemu/qemu/commit/4be21d561d59da9d6f20f872882652bc3561f871
  Author: David Gibson <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M hw/ppc/spapr.c
    M hw/ppc/spapr_hcall.c
    M include/hw/ppc/spapr.h

  Log Message:
  -----------
  pseries: savevm support for pseries machine

This adds the necessary pieces to implement savevm / migration for the
pseries machine.  The most complex part here is migrating the hash
table - for the paravirtualized pseries machine the guest's hash page
table is not stored within guest memory, but externally and the guest
accesses it via hypercalls.

This patch uses a hypervisor reserved bit of the HPTE as a dirty bit
(tracking changes to the HPTE itself, not the page it references).
This is used to implement a live migration style incremental save and
restore of the hash table contents.

Normally a hash table is 16MB but it can get bigger depending on how
much RAM the guest has. Due to its nature, updates to it are random so
the live migration style is used for it.

In addition it adds VMStateDescription information to save and restore
the (few) remaining pieces of state information needed by the pseries
machine.

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Anthony Liguori <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 1112cf94c82dfc743b62b5bcb96dd20f47b683a8
      
https://github.com/qemu/qemu/commit/1112cf94c82dfc743b62b5bcb96dd20f47b683a8
  Author: David Gibson <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M hw/ppc/spapr_pci.c
    M include/hw/pci-host/spapr.h

  Log Message:
  -----------
  pseries: savevm support for PCI host bridge

This adds the necessary support for saving the state of the PAPR virtual
PCI host bridge (or host bridges).

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Anthony Liguori <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: e68cb8b4fa7e20e666a3bfc571a0e075733d22bd
      
https://github.com/qemu/qemu/commit/e68cb8b4fa7e20e666a3bfc571a0e075733d22bd
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M hw/ppc/spapr.c
    M include/hw/ppc/spapr.h
    M target-ppc/kvm.c
    M target-ppc/kvm_ppc.h

  Log Message:
  -----------
  pseries: savevm support with KVM

At present, the savevm / migration support for the pseries machine will not
work when KVM is enabled.  That's because KVM manages the guest's hash page
table in the host kernel, so qemu has no visibility of it.  This patch
fixes this by using new kernel interfaces to extract and reinsert the
guest's hash table during the migration process.

Signed-off-by: David Gibson <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: c04d6cfa3f17a335942f430a3d40e6041100f0c2
      
https://github.com/qemu/qemu/commit/c04d6cfa3f17a335942f430a3d40e6041100f0c2
  Author: Anthony Liguori <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M hw/intc/xics.c
    M hw/ppc/spapr.c
    M include/hw/ppc/spapr.h
    M include/hw/ppc/xics.h

  Log Message:
  -----------
  xics: rename types to be sane and follow coding style

    Basically, in HW the layout of the interrupt network is:

     - One ICP per processor thread (the "presenter"). This contains the
    registers to fetch a pending interrupt (ack), EOI, and control the
    processor priority.

     - One ICS per logical source of interrupts (ie, one per PCI host
    bridge, and a few others here or there). This contains the per-interrupt
    source configuration (target processor(s), priority, mask) and the
    per-interrupt internal state.

    Under PAPR, there is a single "virtual" ICS ... somewhat (it's a bit
    oddball what pHyp does here, arguably there are two but we can ignore
    that distinction). There is no register level access. A pair of firmware
    (RTAS) calls is used to configure each virtual interrupt.

    So our model here is somewhat the same. We have one ICS in the emulated
    XICS which arguably *is* the emulated XICS, there's no point making it a
    separate "device", that would just be gross, and each VCPU has an
    associated ICP.

Yet we call the "XICS" struct icp_state and then the ICPs
'struct icp_server_state'.  It's particularly confusing when all of the
functions have xics_prefixes yet take *icp arguments.

Rename:

  struct icp_state -> XICSState
  struct icp_server_state -> ICPState
  struct ics_state -> ICSState
  struct ics_irq_state -> ICSIRQState

Signed-off-by: David Gibson <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-id: address@hidden
[aik: added ics_resend() on post_load]
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: dbd94f8e4a0a3c4164af7be5bbf6d4e907f3cc03
      
https://github.com/qemu/qemu/commit/dbd94f8e4a0a3c4164af7be5bbf6d4e907f3cc03
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M hw/scsi/spapr_vscsi.c

  Log Message:
  -----------
  spapr-vscsi: fix SOLNT bit in SRP_RSP

The driver calculates SOLNT bit from UCSOLNT and  SCSOLNT bits from
the request. The iu pointer has a type of srp_iu* which points to a union,
so cmd and rsp overlap. As the vscsi_send_rsp function calls
memset(iu, 0, sizeof(rsp)), it clears first 36 bytes of both cmd and rsp
so cmd.sol_not is always zero at the moment of calculating rsp.sol_not.

This fixes the bug.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 949fc82314cc84162e64a5323764527a542421ce
      
https://github.com/qemu/qemu/commit/949fc82314cc84162e64a5323764527a542421ce
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M hw/core/qdev-properties.c
    M hw/net/eepro100.c
    M include/hw/qdev-core.h

  Log Message:
  -----------
  hw: import bitmap operations in qdev-core header

Made small tweaks in code to prevent compilation issues
when importing qemu/bitmap.h in qdev-core

Signed-off-by: Marcel Apfelbaum <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 3d1237fb2ab4edb926c717767bb5e31d6053a7c5
      
https://github.com/qemu/qemu/commit/3d1237fb2ab4edb926c717767bb5e31d6053a7c5
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M include/hw/qdev-core.h
    M qdev-monitor.c

  Log Message:
  -----------
  qemu-help: Sort devices by logical functionality

Categorize devices that appear as output to "-device ?" command
by logical functionality. Sort the devices by logical categories
before showing them to user.

The sort is done by functionality rather than alphabetical.

Signed-off-by: Marcel Apfelbaum <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 125ee0ed9cad04307498ac2b7b0d51ad8a807360
      
https://github.com/qemu/qemu/commit/125ee0ed9cad04307498ac2b7b0d51ad8a807360
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M hw/9pfs/virtio-9p-device.c
    M hw/audio/ac97.c
    M hw/audio/adlib.c
    M hw/audio/cs4231a.c
    M hw/audio/es1370.c
    M hw/audio/gus.c
    M hw/audio/hda-codec.c
    M hw/audio/intel-hda.c
    M hw/audio/pcspk.c
    M hw/audio/pl041.c
    M hw/audio/sb16.c
    M hw/block/fdc.c
    M hw/block/nvme.c
    M hw/block/pc_sysfw.c
    M hw/block/pflash_cfi01.c
    M hw/block/virtio-blk.c
    M hw/char/debugcon.c
    M hw/char/imx_serial.c
    M hw/char/ipack.c
    M hw/char/ipoctal232.c
    M hw/char/parallel.c
    M hw/char/serial-isa.c
    M hw/char/serial-pci.c
    M hw/char/tpci200.c
    M hw/char/virtio-serial-bus.c
    M hw/cpu/icc_bus.c
    M hw/display/cirrus_vga.c
    M hw/display/g364fb.c
    M hw/display/pl110.c
    M hw/display/qxl.c
    M hw/display/vga-isa.c
    M hw/display/vga-pci.c
    M hw/display/vmware_vga.c
    M hw/i2c/bitbang_i2c.c
    M hw/i2c/core.c
    M hw/i386/kvm/pci-assign.c
    M hw/ide/ahci.c
    M hw/ide/ich.c
    M hw/ide/isa.c
    M hw/ide/piix.c
    M hw/ide/qdev.c
    M hw/ide/via.c
    M hw/isa/i82378.c
    M hw/isa/lpc_ich9.c
    M hw/isa/vt82c686.c
    M hw/misc/applesmc.c
    M hw/misc/debugexit.c
    M hw/misc/ivshmem.c
    M hw/misc/pc-testdev.c
    M hw/misc/pci-testdev.c
    M hw/misc/sga.c
    M hw/misc/vfio.c
    M hw/net/e1000.c
    M hw/net/eepro100.c
    M hw/net/lance.c
    M hw/net/mipsnet.c
    M hw/net/ne2000-isa.c
    M hw/net/ne2000.c
    M hw/net/opencores_eth.c
    M hw/net/pcnet-pci.c
    M hw/net/rtl8139.c
    M hw/net/virtio-net.c
    M hw/net/vmxnet3.c
    M hw/pci-bridge/i82801b11.c
    M hw/pci-bridge/ioh3420.c
    M hw/pci-bridge/pci_bridge_dev.c
    M hw/pci-bridge/xio3130_downstream.c
    M hw/pci-bridge/xio3130_upstream.c
    M hw/pci-host/apb.c
    M hw/pci-host/ppce500.c
    M hw/pci-host/prep.c
    M hw/pci-host/q35.c
    M hw/scsi/esp-pci.c
    M hw/scsi/esp.c
    M hw/scsi/lsi53c895a.c
    M hw/scsi/megasas.c
    M hw/scsi/scsi-bus.c
    M hw/scsi/vhost-scsi.c
    M hw/scsi/virtio-scsi.c
    M hw/scsi/vmw_pvscsi.c
    M hw/usb/ccid-card-emulated.c
    M hw/usb/ccid-card-passthru.c
    M hw/usb/dev-audio.c
    M hw/usb/dev-bluetooth.c
    M hw/usb/dev-hid.c
    M hw/usb/dev-hub.c
    M hw/usb/dev-network.c
    M hw/usb/dev-serial.c
    M hw/usb/dev-smartcard-reader.c
    M hw/usb/dev-storage.c
    M hw/usb/dev-uas.c
    M hw/usb/dev-wacom.c
    M hw/usb/hcd-ehci-pci.c
    M hw/usb/hcd-ehci-sysbus.c
    M hw/usb/hcd-ohci.c
    M hw/usb/hcd-uhci.c
    M hw/usb/hcd-xhci.c
    M hw/usb/host-libusb.c
    M hw/usb/host-linux.c
    M hw/usb/redirect.c
    M hw/virtio/virtio-balloon.c
    M hw/virtio/virtio-mmio.c
    M hw/virtio/virtio-pci.c
    M hw/virtio/virtio-rng.c
    M hw/watchdog/wdt_i6300esb.c
    M hw/watchdog/wdt_ib700.c
    M hw/xen/xen_platform.c
    M hw/xen/xen_pt.c

  Log Message:
  -----------
  devices: Associate devices to their logical category

The category will be used to sort the devices displayed in
the command line help.

Signed-off-by: Marcel Apfelbaum <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 8cdd2e0abbf593a38a146d8dfc998754cefbc27a
      
https://github.com/qemu/qemu/commit/8cdd2e0abbf593a38a146d8dfc998754cefbc27a
  Author: Peter Maydell <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M tpm.c

  Log Message:
  -----------
  tpm.c: Don't try to put -1 in a variable of type TpmModel

The TpmModel type is an enum (valid values 0 and 1), which means
the compiler can legitimately decide that comparisons like
'tpm_models[i] == -1' are never true. (For example it could
pick 'unsigned char' as its type for representing the enum.)

Avoid this issue by using TPM_MODEL_MAX to mark entries in
the tpm_models[] array which aren't filled in, instead of -1.

This silences a clang warning:

 tpm.c:43:27: error: comparison of constant -1 with expression of type
      'enum TpmModel' is always false 
[-Werror,-Wtautological-constant-out-of-range-compare]
  if (tpm_models[i] == -1) {
      ~~~~~~~~~~~~~ ^  ~~

Signed-off-by: Peter Maydell <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 55d5d04884305e17b24f378a9ec616bf7354c1ca
      
https://github.com/qemu/qemu/commit/55d5d04884305e17b24f378a9ec616bf7354c1ca
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M memory.c
    M trace-events

  Log Message:
  -----------
  memory: add tracepoints for MMIO reads/writes

This is quite handy to debug softmmu targets.

Reviewed-by: Andreas Faerber <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 98626572f18ddc61c08588c32a1773bc91f8624e
      
https://github.com/qemu/qemu/commit/98626572f18ddc61c08588c32a1773bc91f8624e
  Author: Markus Armbruster <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M configure
    M tests/Makefile
    A tests/qapi-schema/comments.err
    A tests/qapi-schema/comments.exit
    A tests/qapi-schema/comments.json
    A tests/qapi-schema/comments.out
    A tests/qapi-schema/empty.err
    A tests/qapi-schema/empty.exit
    A tests/qapi-schema/empty.json
    A tests/qapi-schema/empty.out
    A tests/qapi-schema/funny-char.err
    A tests/qapi-schema/funny-char.exit
    A tests/qapi-schema/funny-char.json
    A tests/qapi-schema/funny-char.out
    A tests/qapi-schema/indented-expr.err
    A tests/qapi-schema/indented-expr.exit
    A tests/qapi-schema/indented-expr.json
    A tests/qapi-schema/indented-expr.out
    A tests/qapi-schema/missing-colon.err
    A tests/qapi-schema/missing-colon.exit
    A tests/qapi-schema/missing-colon.json
    A tests/qapi-schema/missing-colon.out
    A tests/qapi-schema/missing-comma-list.err
    A tests/qapi-schema/missing-comma-list.exit
    A tests/qapi-schema/missing-comma-list.json
    A tests/qapi-schema/missing-comma-list.out
    A tests/qapi-schema/missing-comma-object.err
    A tests/qapi-schema/missing-comma-object.exit
    A tests/qapi-schema/missing-comma-object.json
    A tests/qapi-schema/missing-comma-object.out
    A tests/qapi-schema/non-objects.err
    A tests/qapi-schema/non-objects.exit
    A tests/qapi-schema/non-objects.json
    A tests/qapi-schema/non-objects.out
    A tests/qapi-schema/quoted-structural-chars.err
    A tests/qapi-schema/quoted-structural-chars.exit
    A tests/qapi-schema/quoted-structural-chars.json
    A tests/qapi-schema/quoted-structural-chars.out
    A tests/qapi-schema/test-qapi.py
    A tests/qapi-schema/trailing-comma-list.err
    A tests/qapi-schema/trailing-comma-list.exit
    A tests/qapi-schema/trailing-comma-list.json
    A tests/qapi-schema/trailing-comma-list.out
    A tests/qapi-schema/trailing-comma-object.err
    A tests/qapi-schema/trailing-comma-object.exit
    A tests/qapi-schema/trailing-comma-object.json
    A tests/qapi-schema/trailing-comma-object.out
    A tests/qapi-schema/unclosed-list.err
    A tests/qapi-schema/unclosed-list.exit
    A tests/qapi-schema/unclosed-list.json
    A tests/qapi-schema/unclosed-list.out
    A tests/qapi-schema/unclosed-object.err
    A tests/qapi-schema/unclosed-object.exit
    A tests/qapi-schema/unclosed-object.json
    A tests/qapi-schema/unclosed-object.out
    A tests/qapi-schema/unclosed-string.err
    A tests/qapi-schema/unclosed-string.exit
    A tests/qapi-schema/unclosed-string.json
    A tests/qapi-schema/unclosed-string.out

  Log Message:
  -----------
  tests: QAPI schema parser tests

The parser handles erroneous input badly.  To be improved shortly.

Signed-off-by: Markus Armbruster <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 4f193e34c6c41abdd06c134e584312077def2bda
      
https://github.com/qemu/qemu/commit/4f193e34c6c41abdd06c134e584312077def2bda
  Author: Markus Armbruster <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    R qapi-schema-test.json
    M tests/Makefile
    A tests/qapi-schema/qapi-schema-test.err
    A tests/qapi-schema/qapi-schema-test.exit
    A tests/qapi-schema/qapi-schema-test.json
    A tests/qapi-schema/qapi-schema-test.out

  Log Message:
  -----------
  tests: Use qapi-schema-test.json as schema parser test

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: c7a3f25200c8692e969f21c7f2555630ec0d0d30
      
https://github.com/qemu/qemu/commit/c7a3f25200c8692e969f21c7f2555630ec0d0d30
  Author: Markus Armbruster <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M scripts/qapi.py
    M tests/qapi-schema/indented-expr.out
    M tests/qapi-schema/missing-colon.out
    M tests/qapi-schema/quoted-structural-chars.err
    M tests/qapi-schema/quoted-structural-chars.exit
    M tests/qapi-schema/quoted-structural-chars.out

  Log Message:
  -----------
  qapi.py: Restructure lexer and parser

The parser has a rather unorthodox structure:

    Until EOF:
   Read a section:
       Generator function get_expr() yields one section after the
      other, as a string.  An unindented, non-empty line that
      isn't a comment starts a new section.
   Lexing:
       Split section into a list of tokens (strings), with help
      of generator function tokenize().
   Parsing:
       Parse the first expression from the list of tokens, with
      parse(), throw away any remaining tokens.
       In parse_schema(): record value of an enum, union or
      struct key (if any) in the appropriate global table,
      append expression to the list of expressions.

    Return list of expressions.

Known issues:

(1) Indentation is significant, unlike in real JSON.

(2) Neither lexer nor parser have any idea of source positions.  Error
    reporting is hard, let's go shopping.

(3) The one error we bother to detect, we "report" via raise.

(4) The lexer silently ignores invalid characters.

(5) If everything in a section gets ignored, the parser crashes.

(6) The lexer treats a string containing a structural character exactly
    like the structural character.

(7) Tokens trailing the first expression in a section are silently
    ignored.

(8) The parser accepts any token in place of a colon.

(9) The parser treats comma as optional.

(10) parse() crashes on unexpected EOF.

(11) parse_schema() crashes when a section's expression isn't a JSON
    object.

Replace this piece of original art by a thoroughly unoriginal design.
Takes care of (1), (2), (5), (6) and (7), and lays the groundwork for
addressing the others.  Generated source files remain unchanged.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 2caba36cc61ee3993334bc423f0852f8006fdfcf
      
https://github.com/qemu/qemu/commit/2caba36cc61ee3993334bc423f0852f8006fdfcf
  Author: Markus Armbruster <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M scripts/qapi.py
    M tests/qapi-schema/test-qapi.py
    M tests/qapi-schema/unclosed-string.err

  Log Message:
  -----------
  qapi.py: Decent syntax error reporting

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 9213aa5391f7c8d3766420d96888f1353af4c890
      
https://github.com/qemu/qemu/commit/9213aa5391f7c8d3766420d96888f1353af4c890
  Author: Markus Armbruster <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M scripts/qapi.py
    M tests/qapi-schema/comments.err
    M tests/qapi-schema/comments.exit
    M tests/qapi-schema/comments.out
    M tests/qapi-schema/funny-char.err
    M tests/qapi-schema/funny-char.exit
    M tests/qapi-schema/funny-char.out

  Log Message:
  -----------
  qapi.py: Reject invalid characters in schema file

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 6974ccd542d11ae5fb1e56dd3d753f2de5cc097e
      
https://github.com/qemu/qemu/commit/6974ccd542d11ae5fb1e56dd3d753f2de5cc097e
  Author: Markus Armbruster <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M scripts/qapi.py
    M tests/qapi-schema/missing-colon.err
    M tests/qapi-schema/missing-colon.exit
    M tests/qapi-schema/missing-colon.out
    M tests/qapi-schema/missing-comma-list.err
    M tests/qapi-schema/missing-comma-list.exit
    M tests/qapi-schema/missing-comma-list.out
    M tests/qapi-schema/missing-comma-object.err
    M tests/qapi-schema/missing-comma-object.exit
    M tests/qapi-schema/missing-comma-object.out
    M tests/qapi-schema/trailing-comma-list.err
    M tests/qapi-schema/trailing-comma-list.exit
    M tests/qapi-schema/trailing-comma-list.out
    M tests/qapi-schema/trailing-comma-object.err
    M tests/qapi-schema/trailing-comma-object.exit
    M tests/qapi-schema/trailing-comma-object.out
    M tests/qapi-schema/unclosed-list.err
    M tests/qapi-schema/unclosed-object.err

  Log Message:
  -----------
  qapi.py: Fix schema parser to check syntax systematically

Fixes at least the following parser bugs:

* accepts any token in place of a colon

* treats comma as optional

* crashes when closing braces or brackets are missing

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 5f3cd2b717c949f3afb502fb4c81193eb18ce6aa
      
https://github.com/qemu/qemu/commit/5f3cd2b717c949f3afb502fb4c81193eb18ce6aa
  Author: Markus Armbruster <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M scripts/qapi.py
    M tests/qapi-schema/non-objects.err
    M tests/qapi-schema/quoted-structural-chars.err

  Log Message:
  -----------
  qapi.py: Fix diagnosing non-objects at a schema's top-level

Report syntax error instead of crashing.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 28b8bd4c759389bdc8430acfa588a23e4a9a7fb8
      
https://github.com/qemu/qemu/commit/28b8bd4c759389bdc8430acfa588a23e4a9a7fb8
  Author: Markus Armbruster <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M scripts/qapi.py

  Log Message:
  -----------
  qapi.py: Rename expr_eval to expr in parse_schema()

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: f1a145e154b0a227a1e192009ca30b351de0a8ef
      
https://github.com/qemu/qemu/commit/f1a145e154b0a227a1e192009ca30b351de0a8ef
  Author: Markus Armbruster <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M scripts/qapi.py
    M tests/qapi-schema/comments.err
    M tests/qapi-schema/comments.exit
    M tests/qapi-schema/comments.out

  Log Message:
  -----------
  qapi.py: Permit comments starting anywhere on the line

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 4f57378fe69836ee2585c4ca631ff50746940fa6
      
https://github.com/qemu/qemu/commit/4f57378fe69836ee2585c4ca631ff50746940fa6
  Author: Markus Armbruster <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M qapi-schema.json
    M qemu-char.c
    M qemu-options.hx

  Log Message:
  -----------
  Revert "chardev: Make the name of memory device consistent"

This reverts commit 6a85e60cb994bd95d1537aafbff65816f3de4637.

Commit 51767e7 "qemu-char: Add new char backend CirMemCharDriver"
introduced a memory ring buffer character device driver named
"memory".  Commit 3949e59 "qemu-char: Saner naming of memchar stuff &
doc fixes" changed the driver name to "ringbuf", along with a whole
bunch of other names, with the following rationale:

    Naming is a mess.  The code calls the device driver
    CirMemCharDriver, the public API calls it "memory", "memchardev",
    or "memchar", and the special commands are named like
    "memchar-FOO".  "memory" is a particularly unfortunate choice,
    because there's another character device driver called
    MemoryDriver.  Moreover, the device's distinctive property is that
    it's a ring buffer, not that's in memory.

This is what we released in 1.4.0.

Unfortunately, the rename missed a critical instance of "memory": the
actual driver name.  Thus, the new device could be used only by an
entirely undocumented name.  The documented name did not work.
Bummer.

Commit 6a85e60 fixes this by changing the documentation to match the
code.  It also changes some, but not all related occurences of
"ringbuf" to "memory".  Left alone are identifiers in C code, HMP and
QMP commands.  The latter are external interface, so they can't be
changed.

The result is an inconsistent mess.  Moreover, "memory" is a rotten
name.  The device's distinctive property is that it's a ring buffer,
not that's in memory.  User's don't care whether it's in RAM, flash,
or carved into chocolate tablets by Oompa Loompas.

Revert the commit.  Next commit will fix just the bug.

Cc: address@hidden
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: c11ed9666d69abaf217c8800f299c519b487b7d3
      
https://github.com/qemu/qemu/commit/c11ed9666d69abaf217c8800f299c519b487b7d3
  Author: Markus Armbruster <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M qemu-char.c

  Log Message:
  -----------
  qemu-char: Register ring buffer driver with correct name "ringbuf"

The driver is new in 1.4, with the documented name "ringbuf".
However, it's actual name is the completely undocumented "memory".
Screwed up in commit 3949e59.  Fix code to match documentation.

Keep the undocumented name working as an alias for compatibility.

Cc: address@hidden
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 3a1da42eb35a67d0dbc899dd571ea386fa11c4dd
      
https://github.com/qemu/qemu/commit/3a1da42eb35a67d0dbc899dd571ea386fa11c4dd
  Author: Markus Armbruster <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M qapi-schema.json
    M qemu-char.c

  Log Message:
  -----------
  qapi: Rename ChardevBackend member "memory" to "ringbuf"

Commit 1da48c6 called the new member "memory" after commit 3949e59
standardized "ringbuf".  Rename for consistency.

However, member name "memory" is visible in QMP since 1.5.  It's
undocumented just like the driver name.  Keep it working anyway.

Cc: address@hidden
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


Compare: https://github.com/qemu/qemu/compare/fdc43322c978...3a1da42eb35a

reply via email to

[Prev in Thread] Current Thread [Next in Thread]