1. 19 7月, 2013 20 次提交
  2. 18 7月, 2013 5 次提交
  3. 17 7月, 2013 5 次提交
  4. 16 7月, 2013 10 次提交
    • L
      qapi: qapi-commands: fix possible leaks on visitor dealloc · 8f91ad8a
      Luiz Capitulino 提交于
      In qmp-marshal.c the dealloc visitor calls use the same errp
      pointer of the input visitor calls. This means that if any of
      the input visitor calls fails, then the dealloc visitor will
      return early, before freeing the object's memory.
      
      Here's an example, consider this code:
      
      int qmp_marshal_input_block_passwd(Monitor *mon, const QDict *qdict, QObject **ret)
      {
      	[...]
      
          char * device = NULL;
          char * password = NULL;
      
          mi = qmp_input_visitor_new_strict(QOBJECT(args));
          v = qmp_input_get_visitor(mi);
          visit_type_str(v, &device, "device", errp);
          visit_type_str(v, &password, "password", errp);
          qmp_input_visitor_cleanup(mi);
      
          if (error_is_set(errp)) {
              goto out;
          }
          qmp_block_passwd(device, password, errp);
      
      out:
          md = qapi_dealloc_visitor_new();
          v = qapi_dealloc_get_visitor(md);
          visit_type_str(v, &device, "device", errp);
          visit_type_str(v, &password, "password", errp);
          qapi_dealloc_visitor_cleanup(md);
      
      	[...]
      
          return 0;
      }
      
      Consider errp != NULL when the out label is reached, we're going
      to leak device and password.
      
      This patch fixes this by always passing errp=NULL for dealloc
      visitors, meaning that we always try to free them regardless of
      any previous failure. The above example would then be:
      
      out:
          md = qapi_dealloc_visitor_new();
          v = qapi_dealloc_get_visitor(md);
          visit_type_str(v, &device, "device", NULL);
          visit_type_str(v, &password, "password", NULL);
          qapi_dealloc_visitor_cleanup(md);
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      8f91ad8a
    • V
      vfio: QEMU-AER: Qemu changes to support AER for VFIO-PCI devices · 7b4b0e9e
      Vijay Mohan Pandarathil 提交于
      Add support for error containment when a VFIO device assigned to a KVM
      guest encounters an error. This is for PCIe devices/drivers that support AER
      functionality. When the host OS is notified of an error in a device either
      through the firmware first approach or through an interrupt handled by the AER
      root port driver, the error handler registered by the vfio-pci driver gets
      invoked. The qemu process is signaled through an eventfd registered per
      VFIO device by the qemu process. In the eventfd handler, qemu decides on
      what action to take. In this implementation, guest is brought down to
      contain the error.
      
      The kernel patches for the above functionality has been already accepted.
      
      This is a refresh of the QEMU patch which was reviewed earlier.
      http://marc.info/?l=linux-kernel&m=136281557608087&w=2
      This patch has the same contents and has been built after refreshing
      to latest upstream and after the linux headers have been updated in qemu.
      
      	- Create eventfd per vfio device assigned to a guest and register an
                event handler
      
      	- This fd is passed to the vfio_pci driver through the SET_IRQ ioctl
      
      	- When the device encounters an error, the eventfd is signalled
                and the qemu eventfd handler gets invoked.
      
      	- In the handler decide what action to take. Current action taken
                is to stop the guest.
      Signed-off-by: NVijay Mohan Pandarathil <vijaymohan.pandarathil@hp.com>
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      7b4b0e9e
    • A
      vfio-pci: VGA quirk update · 39360f0b
      Alex Williamson 提交于
      Turns out all the suspicions for AMD devices were correct, everywhere
      we read a BAR address that the address matches the config space offset,
      there's full access to PCI config space.  Attempt to generalize some
      helpers to allow quirks to easily be added for mirrors and windows.
      Also fill in complete config space for AMD.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      39360f0b
    • A
      Merge remote-tracking branch 'quintela/migration.next' into staging · 6453a3a6
      Anthony Liguori 提交于
      # By Chegu Vinod
      # Via Juan Quintela
      * quintela/migration.next:
        Force auto-convegence of live migration
        Add 'auto-converge' migration capability
        Introduce async_run_on_cpu()
      
      Message-id: 1373664508-5404-1-git-send-email-quintela@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      6453a3a6
    • A
      Merge remote-tracking branch 'cohuck/virtio-ccw-upstr' into staging · 2562becf
      Anthony Liguori 提交于
      # By Dominik Dingel
      # Via Cornelia Huck
      * cohuck/virtio-ccw-upstr:
        virtio-ccw: Enable x-data-plane for virtio-ccw-blk
      
      Message-id: 1373903207-27085-1-git-send-email-cornelia.huck@de.ibm.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      2562becf
    • A
      Merge remote-tracking branch 'pmaydell/tags/pull-target-arm-20130715-1' into staging · ab4e1589
      Anthony Liguori 提交于
      target-arm queue
      
      # gpg: Signature made Mon 15 Jul 2013 11:15:13 AM CDT using RSA key ID 14360CDE
      # gpg: Can't check signature: public key not found
      
      # By Mans Rullgard (3) and others
      # Via Peter Maydell
      * pmaydell/tags/pull-target-arm-20130715-1:
        target-arm: Avoid g_hash_table_get_keys()
        target-arm: avoid undefined behaviour when writing TTBCR
        target-arm/helper.c: Allow const opaques in arm CP
        target-arm/helper.c: Implement MIDR aliases
        target-arm/helper.c: OMAP/StrongARM cp15 crn=0 cleanup
        target-arm: explicitly decode SEVL instruction
        target-arm: implement LDA/STL instructions
        target-arm: add feature flag for ARMv8
      
      Message-id: 1373905022-27735-1-git-send-email-peter.maydell@linaro.org
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      ab4e1589
    • A
      Merge remote-tracking branch 'pmaydell/tags/pull-arm-devs-20130715' into staging · 1750d019
      Anthony Liguori 提交于
      arm-devs queue
      
      # gpg: Signature made Mon 15 Jul 2013 10:53:44 AM CDT using RSA key ID 14360CDE
      # gpg: Can't check signature: public key not found
      
      # By Peter Maydell (4) and others
      # Via Peter Maydell
      * pmaydell/tags/pull-arm-devs-20130715:
        ARM/highbank: add support for Calxeda ECX-2000 / Midway
        ARM/highbank: prepare for adding similar machines
        hw/arm/vexpress: Add alias for flash at address 0 on A15 board
        hw/dma/omap_dma: Fix bugs with DMA requests above 32
        sd/pl181.c: Avoid undefined shift behaviour in RWORD macro
        hw/cpu/a15mpcore: Correct default value for num-irq
        char/cadence_uart: Fix reset for unattached instances
      
      Message-id: 1373904095-27592-1-git-send-email-peter.maydell@linaro.org
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      1750d019
    • A
      Merge remote-tracking branch 'rth/axp-next' into staging · a34001fa
      Anthony Liguori 提交于
      # By Richard Henderson
      # Via Richard Henderson
      * rth/axp-next:
        hw/alpha: Use SRM epoch
        hw/alpha: Drop latch_tmp hack
        exec: Support 64-bit operations in address_space_rw
        hw/alpha: Don't machine check on missing pci i/o
        hw/alpha: Don't use get_system_io
      
      Message-id: 1373840171-25556-1-git-send-email-rth@twiddle.net
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a34001fa
    • A
      Merge remote-tracking branch 'kwolf/for-anthony' into staging · 5699a02e
      Anthony Liguori 提交于
      # By Kevin Wolf (6) and Stefan Hajnoczi (2)
      # Via Kevin Wolf
      * kwolf/for-anthony:
        ahci: Fix FLUSH command
        migration: Fail migration on bdrv_flush_all() error
        cpus: Add return value for vm_stop()
        block: Add return value for bdrv_flush_all()
        qemu-iotests: Update 051 reference output
        block: Don't parse protocol from file.filename
        block: add drive_backup HMP command
        blockdev: add sync mode to drive-backup QMP command
      
      Message-id: 1373887000-4488-1-git-send-email-kwolf@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      5699a02e
    • M
      pc: don't access fw cfg if NULL · d26d9e14
      Michael S. Tsirkin 提交于
      commit f8c457b8
           "pc: pass PCI hole ranges to Guests"
      broke Xen as it has no fw_cfg.
      Check for this configuration and boil out.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Tested-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      d26d9e14