1. 19 3月, 2018 4 次提交
    • J
      blockjobs: add status enum · 58b295ba
      John Snow 提交于
      We're about to add several new states, and booleans are becoming
      unwieldly and difficult to reason about. It would help to have a
      more explicit bookkeeping of the state of blockjobs. To this end,
      add a new "status" field and add our existing states in a redundant
      manner alongside the bools they are replacing:
      
      UNDEFINED: Placeholder, default state. Not currently visible to QMP
                 unless changes occur in the future to allow creating jobs
                 without starting them via QMP.
      CREATED:   replaces !!job->co && paused && !busy
      RUNNING:   replaces effectively (!paused && busy)
      PAUSED:    Nearly redundant with info->paused, which shows pause_count.
                 This reports the actual status of the job, which almost always
                 matches the paused request status. It differs in that it is
                 strictly only true when the job has actually gone dormant.
      READY:     replaces job->ready.
      STANDBY:   Paused, but job->ready is true.
      
      New state additions in coming commits will not be quite so redundant:
      
      WAITING:   Waiting on transaction. This job has finished all the work
                 it can until the transaction converges, fails, or is canceled.
      PENDING:   Pending authorization from user. This job has finished all the
                 work it can until the job or transaction is finalized via
                 block_job_finalize. This implies the transaction has converged
                 and left the WAITING phase.
      ABORTING:  Job has encountered an error condition and is in the process
                 of aborting.
      CONCLUDED: Job has ceased all operations and has a return code available
                 for query and may be dismissed via block_job_dismiss.
      NULL:      Job has been dismissed and (should) be destroyed. Should never
                 be visible to QMP.
      
      Some of these states appear somewhat superfluous, but it helps define the
      expected flow of a job; so some of the states wind up being synchronous
      empty transitions. Importantly, jobs can be in only one of these states
      at any given time, which helps code and external users alike reason about
      the current condition of a job unambiguously.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      58b295ba
    • J
      Blockjobs: documentation touchup · 62bfdf0c
      John Snow 提交于
      Trivial; Document what the job creation flags do,
      and some general tidying.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      62bfdf0c
    • J
      blockjobs: model single jobs as transactions · 75859b94
      John Snow 提交于
      model all independent jobs as single job transactions.
      
      It's one less case we have to worry about when we add more states to the
      transition machine. This way, we can just treat all job lifetimes exactly
      the same. This helps tighten assertions of the STM graph and removes some
      conditionals that would have been needed in the coming commits adding a
      more explicit job lifetime management API.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      75859b94
    • J
      blockjobs: fix set-speed kick · d4fce188
      John Snow 提交于
      If speed is '0' it's not actually "less than" the previous speed.
      Kick the job in this case too.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      d4fce188
  2. 17 3月, 2018 7 次提交
  3. 16 3月, 2018 10 次提交
    • P
      Merge remote-tracking branch 'remotes/jnsnow/tags/bitmaps-pull-request' into staging · 9cc7d0cf
      Peter Maydell 提交于
      # gpg: Signature made Tue 13 Mar 2018 21:11:43 GMT
      # gpg:                using RSA key 7DEF8106AAFC390E
      # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>"
      # Primary key fingerprint: FAEB 9711 A12C F475 812F  18F2 88A9 064D 1835 61EB
      #      Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76  CBD0 7DEF 8106 AAFC 390E
      
      * remotes/jnsnow/tags/bitmaps-pull-request:
        iotests: add dirty bitmap postcopy test
        iotests: add dirty bitmap migration test
        migration: add postcopy migration of dirty bitmaps
        migration: allow qmp command migrate-start-postcopy for any postcopy
        migration: add is_active_iterate handler
        migration/qemu-file: add qemu_put_counted_string()
        migration: include migrate_dirty_bitmaps in migrate_postcopy
        qapi: add dirty-bitmaps migration capability
        migration: introduce postcopy-only pending
        dirty-bitmap: add locked state
        block/dirty-bitmap: add _locked version of bdrv_reclaim_dirty_bitmap
        block/dirty-bitmap: fix locking in bdrv_reclaim_dirty_bitmap
        block/dirty-bitmap: add bdrv_dirty_bitmap_enable_successor()
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      9cc7d0cf
    • P
      Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2018-03-13-v2' into staging · 475fe457
      Peter Maydell 提交于
      nbd patches for 2018-03-13
      
      - Eric Blake: iotests: Fix stuck NBD process on 33
      - Vladimir Sementsov-Ogievskiy: 0/5 nbd server fixing and refactoring before BLOCK_STATUS
      - Eric Blake: nbd/server: Honor FUA request on NBD_CMD_TRIM
      - Stefan Hajnoczi: 0/2 block: fix nbd-server-stop crash after blockdev-snapshot-sync
      - Vladimir Sementsov-Ogievskiy: nbd block status base:allocation
      
      # gpg: Signature made Tue 13 Mar 2018 20:48:37 GMT
      # gpg:                using RSA key A7A16B4A2527436A
      # gpg: Good signature from "Eric Blake <eblake@redhat.com>"
      # gpg:                 aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>"
      # gpg:                 aka "[jpeg image of size 6874]"
      # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2  F3AA A7A1 6B4A 2527 436A
      
      * remotes/ericb/tags/pull-nbd-2018-03-13-v2:
        iotests: new test 209 for NBD BLOCK_STATUS
        iotests: add file_path helper
        iotests.py: tiny refactor: move system imports up
        nbd: BLOCK_STATUS for standard get_block_status function: client part
        block/nbd-client: save first fatal error in nbd_iter_error
        nbd: BLOCK_STATUS for standard get_block_status function: server part
        nbd/server: add nbd_read_opt_name helper
        nbd/server: add nbd_opt_invalid helper
        iotests: add 208 nbd-server + blockdev-snapshot-sync test case
        block: let blk_add/remove_aio_context_notifier() tolerate BDS changes
        nbd/server: Honor FUA request on NBD_CMD_TRIM
        nbd/server: refactor nbd_trip: split out nbd_handle_request
        nbd/server: refactor nbd_trip: cmd_read and generic reply
        nbd/server: fix: check client->closing before sending reply
        nbd/server: fix sparse read
        nbd/server: move nbd_co_send_structured_error up
        iotests: Fix stuck NBD process on 33
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      475fe457
    • P
      Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging · 3788c7b6
      Peter Maydell 提交于
      * Record-replay lockstep execution, log dumper and fixes (Alex, Pavel)
      * SCSI fix to pass maximum transfer size (Daniel Barboza)
      * chardev fixes and improved iothread support (Daniel Berrangé, Peter)
      * checkpatch tweak (Eric)
      * make help tweak (Marc-André)
      * make more PCI NICs available with -net or -nic (myself)
      * change default q35 NIC to e1000e (myself)
      * SCSI support for NDOB bit (myself)
      * membarrier system call support (myself)
      * SuperIO refactoring (Philippe)
      * miscellaneous cleanups and fixes (Thomas)
      
      # gpg: Signature made Mon 12 Mar 2018 16:10:52 GMT
      # gpg:                using RSA key BFFBD25F78C7AE83
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>"
      # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
      #      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83
      
      * remotes/bonzini/tags/for-upstream: (69 commits)
        tcg: fix cpu_io_recompile
        replay: update documentation
        replay: save vmstate of the asynchronous events
        replay: don't process async events when warping the clock
        scripts/replay-dump.py: replay log dumper
        replay: avoid recursive call of checkpoints
        replay: check return values of fwrite
        replay: push replay_mutex_lock up the call tree
        replay: don't destroy mutex at exit
        replay: make locking visible outside replay code
        replay/replay-internal.c: track holding of replay_lock
        replay/replay.c: bump REPLAY_VERSION again
        replay: save prior value of the host clock
        replay: added replay log format description
        replay: fix save/load vm for non-empty queue
        replay: fixed replay_enable_events
        replay: fix processing async events
        cpu-exec: fix exception_index handling
        hw/i386/pc: Factor out the superio code
        hw/alpha/dp264: Use the TYPE_SMC37C669_SUPERIO
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      
      # Conflicts:
      #	default-configs/i386-softmmu.mak
      #	default-configs/x86_64-softmmu.mak
      3788c7b6
    • P
      Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20180313.0' into staging · a57946ff
      Peter Maydell 提交于
      VFIO updates 2018-03-13
      
       - Display support for vGPUs (Gerd Hoffmann)
      
       - Enable new kernel support for mmaps overlapping MSI-X vector table,
         disable MSI-X emulation on POWER (Alexey Kardashevskiy)
      
      # gpg: Signature made Tue 13 Mar 2018 19:48:49 GMT
      # gpg:                using RSA key 239B9B6E3BB08B22
      # gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>"
      # gpg:                 aka "Alex Williamson <alex@shazbot.org>"
      # gpg:                 aka "Alex Williamson <alwillia@redhat.com>"
      # gpg:                 aka "Alex Williamson <alex.l.williamson@gmail.com>"
      # Primary key fingerprint: 42F6 C04E 540B D1A9 9E7B  8A90 239B 9B6E 3BB0 8B22
      
      * remotes/awilliam/tags/vfio-update-20180313.0:
        ppc/spapr, vfio: Turn off MSIX emulation for VFIO devices
        vfio-pci: Allow mmap of MSIX BAR
        vfio/pci: Relax DMA map errors for MMIO regions
        vfio/display: adding dmabuf support
        vfio/display: adding region support
        vfio/display: core & wireup
        vfio/common: cleanup in vfio_region_finalize
        secondary-vga: properly close QemuConsole on unplug
        console: minimal hotplug suport
        ui/pixman: add qemu_drm_format_to_pixman()
        standard-headers: add drm/drm_fourcc.h
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      a57946ff
    • P
      Merge remote-tracking branch 'remotes/berrange/tags/socket-next-pull-request' into staging · 58888f8c
      Peter Maydell 提交于
      # gpg: Signature made Tue 13 Mar 2018 18:12:14 GMT
      # gpg:                using RSA key BE86EBB415104FDF
      # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>"
      # gpg:                 aka "Daniel P. Berrange <berrange@redhat.com>"
      # Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF
      
      * remotes/berrange/tags/socket-next-pull-request:
        char: allow passing pre-opened socket file descriptor at startup
        char: refactor parsing of socket address information
        sockets: allow SocketAddress 'fd' to reference numeric file descriptors
        sockets: check that the named file descriptor is a socket
        sockets: move fd_is_socket() into common sockets code
        sockets: strengthen test suite IP protocol availability checks
        sockets: pull code for testing IP availability out of specific test
        cutils: add qemu_strtoi & qemu_strtoui parsers for int/unsigned int types
        char: don't silently skip tn3270 protocol init when TLS is enabled
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      58888f8c
    • P
      Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-2.12-pull-request' into staging · 55901900
      Peter Maydell 提交于
      # gpg: Signature made Tue 13 Mar 2018 17:33:03 GMT
      # gpg:                using RSA key F30C38BD3F2FBE3C
      # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>"
      # gpg:                 aka "Laurent Vivier <laurent@vivier.eu>"
      # gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>"
      # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C
      
      * remotes/vivier2/tags/linux-user-for-2.12-pull-request:
        linux-user: init_guest_space: Add a comment about search strategy
        linux-user: init_guest_space: Don't try to align if we'll reject it
        linux-user: init_guest_space: Clean up control flow a bit
        linux-user: init_guest_commpage: Add a comment about size check
        linux-user: init_guest_space: Clarify page alignment logic
        linux-user: init_guest_space: Correctly handle guest_start in commpage initialization
        linux-user: init_guest_space: Clean up if we can't initialize the commpage
        linux-user: Rename validate_guest_space => init_guest_commpage
        linux-user: Use #if to only call validate_guest_space for 32-bit ARM target
        qemu-binfmt-conf.sh: add qemu-xtensa
        linux-user: drop unused target_msync function
        linux-user: fix target_mprotect/target_munmap error return values
        linux-user: fix assertion in shmdt
        linux-user: fix mmap/munmap/mprotect/mremap/shmat
        linux-user: Support f_flags in statfs when available.
        linux-user: allows to use "--systemd ALL" with qemu-binfmt-conf.sh
        linux-user: Remove the unused "not implemented" signal handling stubs
        linux-user: Drop unicore32 code
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      55901900
    • R
      tcg: Add choose_vector_size · adb196cb
      Richard Henderson 提交于
      This unifies 5 copies of checks for supported vector size,
      and in the process fixes a missing check in tcg_gen_gvec_2s.
      
      This lead to an assertion failure for 64-bit vector multiply,
      which is not available in the AVX instruction set.
      Suggested-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
      adb196cb
    • R
      tcg/i386: Support INDEX_op_dup2_vec for -m32 · 7f34ed4b
      Richard Henderson 提交于
      Unknown why -m32 was passing with gcc but not clang; it should have
      failed for both.  This would be used for tcg_gen_dup_i64_vec, and
      visible with the right TB and an aarch64 guest.
      Reported-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
      7f34ed4b
    • R
      tcg: Improve tcg_gen_muli_i32/i64 · b2e3ae94
      Richard Henderson 提交于
      Convert multiplication by power of two to left shift.
      Reviewed-by: NEmilio G. Cota <cota@braap.org>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
      b2e3ae94
    • P
      Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream-sev' into staging · 5bdd3743
      Peter Maydell 提交于
      * Migrate MSR_SMI_COUNT (Liran)
      * Update kernel headers (Gerd, myself)
      * SEV support (Brijesh)
      
      I have not tested non-x86 compilation, but I reordered the SEV patches
      so that all non-x86-specific changes go first to catch any possible
      issues (which weren't there anyway :)).
      
      # gpg: Signature made Tue 13 Mar 2018 16:37:06 GMT
      # gpg:                using RSA key BFFBD25F78C7AE83
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>"
      # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
      #      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83
      
      * remotes/bonzini/tags/for-upstream-sev: (22 commits)
        sev/i386: add sev_get_capabilities()
        sev/i386: qmp: add query-sev-capabilities command
        sev/i386: qmp: add query-sev-launch-measure command
        sev/i386: hmp: add 'info sev' command
        cpu/i386: populate CPUID 0x8000_001F when SEV is active
        sev/i386: add migration blocker
        sev/i386: finalize the SEV guest launch flow
        sev/i386: add support to LAUNCH_MEASURE command
        target/i386: encrypt bios rom
        sev/i386: add command to encrypt guest memory region
        sev/i386: add command to create launch memory encryption context
        sev/i386: register the guest memory range which may contain encrypted data
        sev/i386: add command to initialize the memory encryption context
        include: add psp-sev.h header file
        sev/i386: qmp: add query-sev command
        target/i386: add Secure Encrypted Virtualization (SEV) object
        kvm: introduce memory encryption APIs
        kvm: add memory encryption context
        docs: add AMD Secure Encrypted Virtualization (SEV)
        machine: add memory-encryption option
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      5bdd3743
  4. 15 3月, 2018 2 次提交
    • P
      Merge remote-tracking branch 'remotes/stsquad/tags/pull-travis-speedup-130318-1' into staging · 56e8698f
      Peter Maydell 提交于
      Some updates to reduce timeouts in Travis
      
      # gpg: Signature made Tue 13 Mar 2018 16:44:46 GMT
      # gpg:                using RSA key FBD0DB095A9E2A44
      # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>"
      # Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44
      
      * remotes/stsquad/tags/pull-travis-speedup-130318-1:
        .travis.yml: add --disable-user with the rest of the disables
        .travis.yml: split default config into system and user
        .travis.yml: drop setting default log output
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      56e8698f
    • P
      Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.12-pull-request' into staging · 6265e23b
      Peter Maydell 提交于
      # gpg: Signature made Tue 13 Mar 2018 15:58:42 GMT
      # gpg:                using RSA key F30C38BD3F2FBE3C
      # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>"
      # gpg:                 aka "Laurent Vivier <laurent@vivier.eu>"
      # gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>"
      # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C
      
      * remotes/vivier/tags/m68k-for-2.12-pull-request:
        target/m68k: implement fcosh
        target/m68k: implement fsinh
        target/m68k: implement ftanh
        target/m68k: implement fatanh
        target/m68k: implement facos
        target/m68k: implement fasin
        target/m68k: implement fatan
        target/m68k: implement fsincos
        target/m68k: implement fcos
        target/m68k: implement fsin
        target/m68k: implement ftan
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      6265e23b
  5. 14 3月, 2018 17 次提交