1. 24 2月, 2017 1 次提交
    • J
      tcg: drop global lock during TCG code execution · 8d04fb55
      Jan Kiszka 提交于
      This finally allows TCG to benefit from the iothread introduction: Drop
      the global mutex while running pure TCG CPU code. Reacquire the lock
      when entering MMIO or PIO emulation, or when leaving the TCG loop.
      
      We have to revert a few optimization for the current TCG threading
      model, namely kicking the TCG thread in qemu_mutex_lock_iothread and not
      kicking it in qemu_cpu_kick. We also need to disable RAM block
      reordering until we have a more efficient locking mechanism at hand.
      
      Still, a Linux x86 UP guest and my Musicpal ARM model boot fine here.
      These numbers demonstrate where we gain something:
      
      20338 jan       20   0  331m  75m 6904 R   99  0.9   0:50.95 qemu-system-arm
      20337 jan       20   0  331m  75m 6904 S   20  0.9   0:26.50 qemu-system-arm
      
      The guest CPU was fully loaded, but the iothread could still run mostly
      independent on a second core. Without the patch we don't get beyond
      
      32206 jan       20   0  330m  73m 7036 R   82  0.9   1:06.00 qemu-system-arm
      32204 jan       20   0  330m  73m 7036 S   21  0.9   0:17.03 qemu-system-arm
      
      We don't benefit significantly, though, when the guest is not fully
      loading a host CPU.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Message-Id: <1439220437-23957-10-git-send-email-fred.konrad@greensocs.com>
      [FK: Rebase, fix qemu_devices_reset deadlock, rm address_space_* mutex]
      Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com>
      [EGC: fixed iothread lock for cpu-exec IRQ handling]
      Signed-off-by: NEmilio G. Cota <cota@braap.org>
      [AJB: -smp single-threaded fix, clean commit msg, BQL fixes]
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Reviewed-by: NPranith Kumar <bobby.prani@gmail.com>
      [PM: target-arm changes]
      Acked-by: NPeter Maydell <peter.maydell@linaro.org>
      8d04fb55
  2. 22 2月, 2017 1 次提交
  3. 19 5月, 2016 1 次提交
  4. 29 1月, 2016 1 次提交
    • P
      exec: Clean up includes · 7b31bbc2
      Peter Maydell 提交于
      Clean up includes so that osdep.h is included first and headers
      which it implies are not included manually.
      
      This commit was created with scripts/clean-includes.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1453832250-766-4-git-send-email-peter.maydell@linaro.org
      7b31bbc2
  5. 02 12月, 2015 1 次提交
    • P
      translate-all: ensure host page mask is always extended with 1's · 0c2d70c4
      Paolo Bonzini 提交于
      Anthony reported that >4GB guests on Xen with 32bit QEMU broke after
      commit 4ed023ce ("Round up RAMBlock sizes to host page sizes", 2015-11-05).
      
      In that patch sizes are masked against qemu_host_page_size/mask which
      are uintptr_t, and thus 32bit on a 32bit QEMU, even though the ram space
      might be bigger than 4GB on Xen.
      
      Since ram_addr_t is not available on user-mode emulation targets, ensure
      that we get a sign extension when masking away the low bits of the address.
      Remove the ~10 year old scary comment that the type of these variables
      is probably wrong, with another equally scary comment.  The new comment
      however does not have "???" in it, which is arguably an improvement.
      
      For completeness use the alignment macros in linux-user and bsd-user
      instead of manually doing an &.  linux-user and bsd-user are not affected
      by the Xen issue, however.
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Reported-by: NAnthony PERARD <anthony.perard@citrix.com>
      Fixes: 4ed023ceSigned-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0c2d70c4
  6. 16 9月, 2015 2 次提交