1. 31 10月, 2016 17 次提交
    • A
      block: Use block_job_add_bdrv() in mirror_start_job() · cee3c6b5
      Alberto Garcia 提交于
      Use block_job_add_bdrv() instead of blocking all operations in
      mirror_start_job() and unblocking them in mirror_exit().
      Signed-off-by: NAlberto Garcia <berto@igalia.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      cee3c6b5
    • A
      block: Add block_job_add_bdrv() · 23d402d4
      Alberto Garcia 提交于
      When a block job is created on a certain BlockDriverState, operations
      are blocked there while the job exists. However, some block jobs may
      involve additional BDSs, which must be blocked separately when the job
      is created and unblocked manually afterwards.
      
      This patch adds block_job_add_bdrv(), that simplifies this process by
      keeping a list of BDSs that are involved in the specified block job.
      Signed-off-by: NAlberto Garcia <berto@igalia.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      23d402d4
    • A
      block: Pause all jobs during bdrv_reopen_multiple() · 40840e41
      Alberto Garcia 提交于
      When a BlockDriverState is about to be reopened it can trigger certain
      operations that need to write to disk. During this process a different
      block job can be woken up. If that block job completes and also needs
      to call bdrv_reopen() it can happen that it needs to do it on the same
      BlockDriverState that is still in the process of being reopened.
      
      This can have fatal consequences, like in this example:
      
        1) Block job A starts and sleeps after a while.
        2) Block job B starts and tries to reopen node1 (a qcow2 file).
        3) Reopening node1 means flushing and replacing its qcow2 cache.
        4) While the qcow2 cache is being flushed, job A wakes up.
        5) Job A completes and reopens node1, replacing its cache.
        6) Job B resumes, but the cache that was being flushed no longer
           exists.
      
      This patch splits the bdrv_drain_all() call to keep all block jobs
      paused during bdrv_reopen_multiple(), so that step 4 can never happen
      and the operation is safe.
      
      Note that this scenario can only happen if both bdrv_reopen() calls
      are made by block jobs on the same backing chain. Otherwise there's no
      chance that the same BlockDriverState appears in both reopen queues.
      Signed-off-by: NAlberto Garcia <berto@igalia.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      40840e41
    • A
      block: Add bdrv_drain_all_{begin,end}() · c0778f66
      Alberto Garcia 提交于
      bdrv_drain_all() doesn't allow the caller to do anything after all
      pending requests have been completed but before block jobs are
      resumed.
      
      This patch splits bdrv_drain_all() into _begin() and _end() for that
      purpose. It also adds aio_{disable,enable}_external() calls to disable
      external clients in the meantime.
      
      An important restriction of this split is that no new block jobs or
      BlockDriverStates can be created between the bdrv_drain_all_begin()
      and bdrv_drain_all_end() calls. This is not a concern now because
      we'll only be using this in bdrv_reopen_multiple(), but it must be
      dealt with if we ever have other uses cases in the future.
      Signed-off-by: NAlberto Garcia <berto@igalia.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      c0778f66
    • A
      qapi: allow blockdev-add for ssh · ad0e90a6
      Ashijeet Acharya 提交于
      Introduce new object 'BlockdevOptionsSsh' in qapi/block-core.json to
      support blockdev-add for SSH network protocol driver. Use only 'struct
      InetSocketAddress' since SSH only supports connection over TCP.
      Signed-off-by: NAshijeet Acharya <ashijeetacharya@gmail.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      [ kwolf: Removed host_key_check option, we want to expose this later in
        a structured way rather than as a string that must be parsed ]
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      ad0e90a6
    • A
      block/ssh: Use InetSocketAddress options · 1059f1bb
      Ashijeet Acharya 提交于
      Drop the use of legacy options in favour of the InetSocketAddress
      options.
      Signed-off-by: NAshijeet Acharya <ashijeetacharya@gmail.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      1059f1bb
    • A
      block/ssh: Add InetSocketAddress and accept it · 0da5b8ef
      Ashijeet Acharya 提交于
      Add InetSocketAddress compatibility to SSH driver.
      
      Add a new option "server" to the SSH block driver which then accepts
      a InetSocketAddress.
      
      "host" and "port" are supported as legacy options and are mapped to
      their InetSocketAddress representation.
      Signed-off-by: NAshijeet Acharya <ashijeetacharya@gmail.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      0da5b8ef
    • A
      util/qemu-sockets: Make inet_connect_saddr() public · 89cadc9d
      Ashijeet Acharya 提交于
      Make inet_connect_saddr() in util/qemu-sockets.c public in order to be
      able to use it with InetSocketAddress sockets outside of
      util/qemu-sockets.c independently.
      Signed-off-by: NAshijeet Acharya <ashijeetacharya@gmail.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      89cadc9d
    • A
      block/ssh: Add ssh_has_filename_options_conflict() · 89dbe180
      Ashijeet Acharya 提交于
      We have 5 options plus ("server") option which is added in the next
      patch that conflict with specifying a SSH filename. We need to iterate
      over all the options to check whether its key has an "server." prefix.
      
      This iteration will help us adding the new option "server" easily.
      Signed-off-by: NAshijeet Acharya <ashijeetacharya@gmail.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      89dbe180
    • P
      Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20161031' into staging · 0bb11379
      Peter Maydell 提交于
      Two PCI fixes/improvements for s390x.
      
      # gpg: Signature made Mon 31 Oct 2016 10:09:24 GMT
      # gpg:                using RSA key 0xDECF6B93C6F02FAF
      # gpg: Good signature from "Cornelia Huck <huckc@linux.vnet.ibm.com>"
      # gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>"
      # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF
      
      * remotes/cohuck/tags/s390x-20161031:
        s390x/pci: Check memory region dispatching callbacks
        s390x/pci: use generic interface to inject interrupt
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      0bb11379
    • P
      Merge remote-tracking branch 'remotes/amit-migration/tags/migration-for-2.8' into staging · eab9e962
      Peter Maydell 提交于
      Migration bits from the COLO project
      
      # gpg: Signature made Sun 30 Oct 2016 10:39:55 GMT
      # gpg:                using RSA key 0xEB0B4DFC657EF670
      # gpg: Good signature from "Amit Shah <amit@amitshah.net>"
      # gpg:                 aka "Amit Shah <amit@kernel.org>"
      # gpg:                 aka "Amit Shah <amitshah@gmx.net>"
      # Primary key fingerprint: 48CA 3722 5FE7 F4A8 B337  2735 1E9A 3B5F 8540 83B6
      #      Subkey fingerprint: CC63 D332 AB8F 4617 4529  6534 EB0B 4DFC 657E F670
      
      * remotes/amit-migration/tags/migration-for-2.8:
        MAINTAINERS: Add maintainer for COLO framework related files
        configure: Support enable/disable COLO feature
        docs: Add documentation for COLO feature
        COLO: Implement failover work for secondary VM
        COLO: Implement the process of failover for primary VM
        COLO: Introduce state to record failover process
        COLO: Add 'x-colo-lost-heartbeat' command to trigger failover
        COLO: Synchronize PVM's state to SVM periodically
        COLO: Add checkpoint-delay parameter for migrate-set-parameters
        COLO: Load VMState into QIOChannelBuffer before restore it
        COLO: Send PVM state to secondary side when do checkpoint
        COLO: Add a new RunState RUN_STATE_COLO
        COLO: Introduce checkpointing protocol
        COLO: Establish a new communicating path for COLO
        migration: Switch to COLO process after finishing loadvm
        migration: Enter into COLO mode after migration if COLO is enabled
        COLO: migrate COLO related info to secondary node
        migration: Introduce capability 'x-colo' to migration
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      eab9e962
    • P
      Merge remote-tracking branch 'remotes/sstabellini/tags/xen-20161028-tag' into staging · 5ff06787
      Peter Maydell 提交于
      Xen 2016/10/28
      
      # gpg: Signature made Sat 29 Oct 2016 02:03:42 BST
      # gpg:                using RSA key 0x894F8F4870E1AE90
      # gpg: Good signature from "Stefano Stabellini <sstabellini@kernel.org>"
      # gpg:                 aka "Stefano Stabellini <stefano.stabellini@eu.citrix.com>"
      # Primary key fingerprint: D04E 33AB A51F 67BA 07D3  0AEA 894F 8F48 70E1 AE90
      
      * remotes/sstabellini/tags/xen-20161028-tag:
        xen: Rename xen_be_del_xendev
        xen: Rename xen_be_find_xendev
        xen: Rename xen_be_evtchn_event
        xen: Rename xen_be_send_notify
        xen: Rename xen_be_unbind_evtchn
        xen: Rename xen_be_printf to xen_pv_printf
        xen: Move xenstore cleanup and mkdir functions
        xen: Prepare xendev qtail to be shared with frontends
        xen: Move evtchn functions to xen_pvdev.c
        xen: Move xenstore_update to xen_pvdev.c
        xen: Create a new file xen_pvdev.c
        xen: Fix coding style warnings
        xen: Fix coding style errors
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      5ff06787
    • P
      Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-fetch' into staging · 277d44f5
      Peter Maydell 提交于
      trivial patches for 2016-10-28
      
      # gpg: Signature made Fri 28 Oct 2016 16:17:51 BST
      # gpg:                using RSA key 0x701B4F6B1A693E59
      # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
      # gpg:                 aka "Michael Tokarev <mjt@corpit.ru>"
      # gpg:                 aka "Michael Tokarev <mjt@debian.org>"
      # Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
      #      Subkey fingerprint: 7B73 BAD6 8BE7 A2C2 8931  4B22 701B 4F6B 1A69 3E59
      
      * remotes/mjt/tags/trivial-patches-fetch: (23 commits)
        Fix build for less common build directories names
        clean-up: removed duplicate #includes
        scripts/clean-includes: added duplicate #include check
        monitor: deprecate 'default' option
        qemu-ga: Remove stray 'q' in documentation
        Makefile: Fix help text for target 'installer'
        s390: avoid always-true comparison in s390_pci_generate_fid()
        migration: Remove unneeded NULL check from migrate_fd_error()
        scripts/hxtool: fix undefined behavour of echo
        qemu-options.hx: set: fix copy-paste error
        usb: Change *_exitfn return type from int to void
        MAINTAINERS: qemu-trivial information
        colo-compare: remove unused struct CompareChardevProps and 'props' variable
        milkymist-pfpu: fix potential integer overflow
        hw/block/nvme: Simplify if-statements a little bit
        target-lm32: rewrite gen_compare()
        lm32: milkymist-tmu2: fix integer overflow
        target-lm32: disable asm logging via LOG_DIS()
        target-lm32: swap operand of wcsr in LOG_DIS()
        target-lm32: fix LOG_DIS operand order
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      277d44f5
    • P
      Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20161028' into staging · 4178c782
      Peter Maydell 提交于
      target-arm queue:
       * Fix reset GPIO handling for spitz, tosa boards
       * virt: add 'pmu' property for configuring whether to expose the
         vPMU to the guest
       * char: cadence: correct reset value for baud rate registers
       * versatilepb: do not run if user asks for more than 256MB RAM
       * pxa2xx: Set value default values for CCCR and CKEN on PXA255
       * arm: cubieboard: Add support for initrd
       * i.MX: Fix GPIO ISR register write
      
      # gpg: Signature made Fri 28 Oct 2016 15:56:56 BST
      # gpg:                using RSA key 0x3C2525ED14360CDE
      # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"
      # gpg:                 aka "Peter Maydell <pmaydell@gmail.com>"
      # gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>"
      # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE
      
      * remotes/pmaydell/tags/pull-target-arm-20161028:
        hw/arm/tosa: Fix reset handling
        hw/arm/spitz: Fix reset handling
        arm: virt: add PMU property to mach-virt machine type
        arm: Add an option to turn on/off vPMU support
        char: cadence: correct reset value for baud rate registers
        versatilepb: do not run if user asks for more than 256MB RAM
        hw/arm/pxa2xx: Set value default values for CCCR and CKEN on PXA255
        arm: cubieboard: Add support for initrd
        i.MX: Fix GPIO ISR register write
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      4178c782
    • P
      Merge remote-tracking branch 'remotes/famz/tags/for-upstream' into staging · 5273a45e
      Peter Maydell 提交于
      # gpg: Signature made Fri 28 Oct 2016 15:47:39 BST
      # gpg:                using RSA key 0xCA35624C6A9171C6
      # gpg: Good signature from "Fam Zheng <famz@redhat.com>"
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 5003 7CB7 9706 0F76 F021  AD56 CA35 624C 6A91 71C6
      
      * remotes/famz/tags/for-upstream:
        aio: convert from RFifoLock to QemuRecMutex
        qemu-thread: introduce QemuRecMutex
        iothread: release AioContext around aio_poll
        block: only call aio_poll on the current thread's AioContext
        qemu-img: call aio_context_acquire/release around block job
        qemu-io: acquire AioContext
        block: prepare bdrv_reopen_multiple to release AioContext
        replication: pass BlockDriverState to reopen_backing_file
        iothread: detach all block devices before stopping them
        aio: introduce qemu_get_current_aio_context
        sheepdog: use BDRV_POLL_WHILE
        nfs: use BDRV_POLL_WHILE
        nfs: move nfs_set_events out of the while loops
        block: introduce BDRV_POLL_WHILE
        qed: Implement .bdrv_drain
        block: change drain to look only at one child at a time
        block: add BDS field to count in-flight requests
        mirror: use bdrv_drained_begin/bdrv_drained_end
        blockjob: introduce .drain callback for jobs
        replication: interrupt failover if the main device is closed
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      5273a45e
    • P
      s390x/pci: Check memory region dispatching callbacks · 88ee13c7
      Pierre Morel 提交于
      The instructions PCI STORE, PCI LOAD and PCI STORE BLOCK
      use calls to memory_region_dispatch_write() and
      memory_region_dispatch_read() but do not test the return value.
      
      Furthermore, the instruction PCI STORE BLOCK sets up a PGM_ADDRESSING
      exception when the operand 3 is not within the designated PCI address
      space instead of a PGM_OPERAND exception.
      
      Let's setup a PGM_OPERAND exception in all of these failure cases.
      Signed-off-by: NPierre Morel <pmorel@linux.vnet.ibm.com>
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      88ee13c7
    • Y
      s390x/pci: use generic interface to inject interrupt · 45bbcd35
      Yi Min Zhao 提交于
      Let's use the generic interface to inject adapter interrupts.
      Signed-off-by: NYi Min Zhao <zyimin@linux.vnet.ibm.com>
      Acked-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      45bbcd35
  2. 30 10月, 2016 18 次提交
  3. 29 10月, 2016 5 次提交