1. 31 10月, 2016 23 次提交
    • P
      Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream-mttcg' into staging · 6bc56d31
      Peter Maydell 提交于
      Base patches for MTTCG enablement.
      
      # gpg: Signature made Mon 31 Oct 2016 14:01:41 GMT
      # gpg:                using RSA key 0xBFFBD25F78C7AE83
      # 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-mttcg:
        tcg: move locking for tb_invalidate_phys_page_range up
        *_run_on_cpu: introduce run_on_cpu_data type
        cpus: re-factor out handle_icount_deadline
        tcg: cpus rm tcg_exec_all()
        tcg: move tcg_exec_all and helpers above thread fn
        target-arm/arm-powerctl: wake up sleeping CPUs
        tcg: protect translation related stuff with tb_lock.
        translate-all: Add assert_(memory|tb)_lock annotations
        linux-user/elfload: ensure mmap_lock() held while setting up
        tcg: comment on which functions have to be called with tb_lock held
        cpu-exec: include cpu_index in CPU_LOG_EXEC messages
        translate-all: add DEBUG_LOCKING asserts
        translate_all: DEBUG_FLUSH -> DEBUG_TB_FLUSH
        cpus: make all_vcpus_paused() return bool
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      6bc56d31
    • 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
    • A
      tcg: move locking for tb_invalidate_phys_page_range up · ba051fb5
      Alex Bennée 提交于
      In the linux-user case all things that involve ''l1_map' and PageDesc
      tweaks are protected by the memory lock (mmpa_lock). For SoftMMU mode
      we previously relied on single threaded behaviour, with MTTCG we now use
      the tb_lock().
      
      As a result we need to do a little re-factoring  and push the taking of
      this lock up the call tree. This requires a slightly different entry for
      the SoftMMU and user-mode cases from tb_invalidate_phys_range.
      
      This also means user-mode breakpoint insertion needs to take two locks
      but it hadn't taken any previously so this is an improvement.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-Id: <20161027151030.20863-20-alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      ba051fb5
    • P
      *_run_on_cpu: introduce run_on_cpu_data type · 14e6fe12
      Paolo Bonzini 提交于
      This changes the *_run_on_cpu APIs (and helpers) to pass data in a
      run_on_cpu_data type instead of a plain void *. This is because we
      sometimes want to pass a target address (target_ulong) and this fails on
      32 bit hosts emulating 64 bit guests.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-Id: <20161027151030.20863-24-alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      14e6fe12
    • 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
    • A
      cpus: re-factor out handle_icount_deadline · 12e9700d
      Alex Bennée 提交于
      In preparation for adding a MTTCG thread we re-factor out a bit of what
      will be common code to handle the QEMU_CLOCK_VIRTUAL expiration.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Message-Id: <20161027151030.20863-18-alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      12e9700d
    • A
      tcg: cpus rm tcg_exec_all() · c93bbbef
      Alex Bennée 提交于
      In preparation for multi-threaded TCG we remove tcg_exec_all and move
      all the CPU cycling into the main thread function. When MTTCG is enabled
      we shall use a separate thread function which only handles one vCPU.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NSergey Fedorov <sergey.fedorov@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      
      Message-Id: <20161027151030.20863-13-alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      c93bbbef
    • A
      tcg: move tcg_exec_all and helpers above thread fn · 1be7fcb8
      Alex Bennée 提交于
      This is a pure mechanical change in preparation for up-coming
      re-factoring. Instead of a forward declaration for tcg_exec_all it and
      the associated helper functions are moved in front of the call from
      qemu_tcg_cpu_thread_fn.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Message-Id: <20161027151030.20863-12-alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      1be7fcb8
    • A
      target-arm/arm-powerctl: wake up sleeping CPUs · 548ebcaf
      Alex Bennée 提交于
      Testing with Alexander's bare metal syncronisation tests fails in MTTCG
      leaving one CPU spinning forever waiting for the second CPU to wake up.
      We simply need to kick the vCPU once we have processed the PSCI power on
      call.
      
      As the power control API is for system emulation only as is the
      qemu_kick_cpu function we also ensure we only build arm-powerctl for
      SoftMMU builds.
      Tested-by: NAlex Bennée <alex.bennee@linaro.org>
      CC: Alexander Spyridakis <a.spyridakis@virtualopensystems.com>
      Message-Id: <1439220437-23957-20-git-send-email-fred.konrad@greensocs.com>
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      
      Message-Id: <20161027151030.20863-11-alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      548ebcaf
    • K
      tcg: protect translation related stuff with tb_lock. · a5e99826
      KONRAD Frederic 提交于
      This protects all translation related work with tb_lock() too ensure
      thread safety. This effectively serialises all code generation. In
      addition to the code generation we also take the lock for TB
      invalidation. This has a knock on effect of meaning tb_lock() is held
      for modification of the SoftMMU TLB by non-self threads which will be
      used in later patches.
      Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com>
      Message-Id: <1439220437-23957-8-git-send-email-fred.konrad@greensocs.com>
      Signed-off-by: NEmilio G. Cota <cota@braap.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      [AJB: moved into tree, clean-up history]
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Message-Id: <20161027151030.20863-10-alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      a5e99826
    • A
      translate-all: Add assert_(memory|tb)_lock annotations · e505a063
      Alex Bennée 提交于
      This adds calls to the assert_(memory|tb)_lock for all public APIs which
      are documented as needing them held for linux-user mode. The asserts are
      NOPs for system-mode although these will be converted when MTTCG is
      enabled.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Message-Id: <20161027151030.20863-9-alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e505a063
    • A
      linux-user/elfload: ensure mmap_lock() held while setting up · 98c1076c
      Alex Bennée 提交于
      Future patches will enforce the holding of mmap_lock() when we are
      manipulating internal memory structures. Technically it doesn't matter
      in the case of elfload as we haven't started executing yet. However it
      is easier to grab the lock when required than special case the
      translate-all API.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Message-Id: <20161027151030.20863-8-alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      98c1076c
    • P
      tcg: comment on which functions have to be called with tb_lock held · 7d7500d9
      Paolo Bonzini 提交于
      softmmu requires more functions to be thread-safe, because translation
      blocks can be invalidated from e.g. notdirty callbacks.  Probably the
      same holds for user-mode emulation, it's just that no one has ever
      tried to produce a coherent locking there.
      
      This patch will guide the introduction of more tb_lock and tb_unlock
      calls for system emulation.
      
      Note that after this patch some (most) of the mentioned functions are
      still called outside tb_lock/tb_unlock.  The next one will rectify this.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Message-Id: <20161027151030.20863-7-alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7d7500d9
    • A
      cpu-exec: include cpu_index in CPU_LOG_EXEC messages · 4426f83a
      Alex Bennée 提交于
      Even more important when debugging MTTCG is seeing which vCPU is
      currently executing.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Message-Id: <20161027151030.20863-5-alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      4426f83a
    • A
      translate-all: add DEBUG_LOCKING asserts · 301e40ed
      Alex Bennée 提交于
      This adds asserts to check the locking on the various translation
      engines structures. There are two sets of structures that are protected
      by locks.
      
      The first the l1map and PageDesc structures used to track which
      translation blocks are associated with which physical addresses. In
      user-mode this is covered by the mmap_lock.
      
      The second case are TB context related structures which are protected by
      tb_lock which is also user-mode only.
      
      Currently the asserts do nothing in SoftMMU mode but this will change
      for MTTCG.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Message-Id: <20161027151030.20863-4-alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      301e40ed
    • A
      translate_all: DEBUG_FLUSH -> DEBUG_TB_FLUSH · 955939a2
      Alex Bennée 提交于
      Make the debug define consistent with the others. The flush operation is
      all about invalidating TranslationBlocks on flush events.
      
      Also fix up the commenting on the other DEBUG for the benefit of
      checkpatch.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Message-Id: <20161027151030.20863-3-alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      955939a2
    • A
      cpus: make all_vcpus_paused() return bool · e8faee06
      Alex Bennée 提交于
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NSergey Fedorov <sergey.fedorov@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      
      Message-Id: <20161027151030.20863-2-alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e8faee06
    • 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 17 次提交