1. 05 11月, 2015 3 次提交
    • L
      Revert "Introduce cpu_clean_all_dirty" · 6388acc8
      Liang Li 提交于
      This reverts commit de9d61e8.
      
      Now 'cpu_clean_all_dirty' is useless, we can revert the related code.
      
      Conflicts:
      	include/sysemu/kvm.h
      Signed-off-by: NLiang Li <liang.z.li@intel.com>
      Message-Id: <1446695464-27116-3-git-send-email-liang.z.li@intel.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      6388acc8
    • L
      kvmclock: add a new function to update env->tsc. · 0fd7e098
      Liang Li 提交于
      The commit 317b0a6d fixed an issue which caused by the outdated
      env->tsc value, but the fix lead to 'cpu_synchronize_all_states()'
      called twice during live migration. The 'cpu_synchronize_all_states()'
      takes about 130us for a VM which has 4 vcpus, it's a bit expensive.
      
      Synchronize the whole CPU context just for updating env->tsc is too
      wasting, this patch use a new function to update the env->tsc.
      Comparing to 'cpu_synchronize_all_states()', it only takes about 20us.
      Signed-off-by: NLiang Li <liang.z.li@intel.com>
      Message-Id: <1446695464-27116-2-git-send-email-liang.z.li@intel.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0fd7e098
    • J
      configure: disable FORTIFY_SOURCE under clang · b553a042
      John Snow 提交于
      Some versions of clang may have difficulty compiling glibc headers when
      -D_FORTIFY_SOURCE is used. For example, Clang++ 3.5.0-9.fc22 cannot
      compile glibc's stdio headers when -D_FORTIFY_SOURCE=2 is used. This
      manifests currently as build failures with clang and any arm target.
      
      According to LLVM dev Richard Smith, clang does not target or support
      FORTIFY_SOURCE + glibc, and it should not be relied on.
      "It's still an unsupported combination, and while it might compile, some
      of the checks are unlikely to work because they require a frontend
      inliner to be useful"
      
      See: http://lists.llvm.org/pipermail/cfe-dev/2015-November/045846.html
      
      Conclusion: disable fortify-source if we appear to be using clang instead
      of testing for compile success or failure, which may be incidental or not
      indicative of proper support of the feature.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-Id: <1446583422-10153-1-git-send-email-jsnow@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      b553a042
  2. 04 11月, 2015 10 次提交
    • P
      backends/hostmem-file: Allow to specify full pathname for backing file · 8d31d6b6
      Pavel Fedin 提交于
      This allows to explicitly specify file name to use with the backend. This
      is important when using it together with ivshmem in order to make it backed
      by hugetlbfs. By default filename is autogenerated using mkstemp(), and the
      file is unlink()ed after creation, effectively making it anonymous. This is
      not very useful with ivshmem because it ends up in a memory which cannot be
      accessed by something else.
      
      Distinction between directory and file name is done by stat() check. If an
      existing directory is given, the code keeps old behavior. Otherwise it
      creates or opens a file with the given pathname.
      Signed-off-by: NPavel Fedin <p.fedin@samsung.com>
      Tested-by: NIgor Skalkin <i.skalkin@samsung.com>
      Message-Id: <004301d11166$9672fe30$c358fa90$@samsung.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      8d31d6b6
    • J
      configure: disallow ccache during compile tests · 5e4dfd3d
      John Snow 提交于
      If the user is using ccache during the configuration step,
      it may interfere with some of the configuration tests,
      particularly the "Is ccache interfering with macro analysis" step,
      which is a bit of a poetic problem.
      
      1) Disallow ccache from reading from the cache during configure,
         but don't disable it entirely to allow us to see if it causes other
         problems.
      
      2) Force off CCACHE_CPP2 during the ccache test to get a deterministic
         answer over whether or not we need to enable that feature later.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-Id: <1446055000-29150-1-git-send-email-jsnow@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      5e4dfd3d
    • S
      cpu-exec: Fix compiler warning (-Werror=clobbered) · 0448f5f8
      Stefan Weil 提交于
      Reloading of local variables after sigsetjmp is only needed for some
      buggy compilers.
      
      The code which should reload these variables causes compiler warnings
      with gcc 4.7 when compiler optimizations are enabled:
      
      cpu-exec.c:204:15: error:
       variable ‘cpu’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
      cpu-exec.c:207:15: error:
       variable ‘cc’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
      cpu-exec.c:202:28: error:
       argument ‘env’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
      
      Now this code is only used for compilers which need it
      (and gcc 4.5.x, x > 0 which does not need it but won't give warnings).
      
      There were bug reports for clang and gcc 4.5.0, while gcc 4.5.1
      was reported to work fine without the reload code. For clang it
      is not clear which versions are affected, so simply keep the status quo
      for all clang compilations. This can be improved later.
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Message-Id: <1443266606-21400-1-git-send-email-sw@weilnetz.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0448f5f8
    • P
      memory: call begin, log_start and commit when registering a new listener · 680a4783
      Paolo Bonzini 提交于
      This ensures that cpu_reload_memory_map() is called as soon as
      tcg_cpu_address_space_init() is called, and before cpu->memory_dispatch
      is used.  qemu-system-s390x never changes the address spaces after
      tcg_cpu_address_space_init() is called, and thus tcg_commit() is never
      called.  This causes a SIGSEGV.
      
      Because memory_map_init() will now call mem_commit(), we have to
      initialize io_mem_* before address_space_memory and friends.
      Reported-by: NPhilipp Kern <pkern@debian.org>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Fixes: 0a1c71ceSigned-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      680a4783
    • E
      megasas: Use qemu_hw_version() instead of QEMU_VERSION · 69fbd0ea
      Eduardo Habkost 提交于
      Guest visible data shouldn't change with a simple QEMU upgrade, so use
      qemu_hw_version() to ensure it won't change (as long as the machine
      class being used has hw_version set).
      
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: qemu-block@nongnu.org
      Reviewed-by: NHannes Reinecke <hare@suse.com>
      Acked-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <1446233769-7892-4-git-send-email-ehabkost@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      69fbd0ea
    • E
      osdep: Rename qemu_{get, set}_version() to qemu_{, set_}hw_version() · 35c2c8dc
      Eduardo Habkost 提交于
      This makes the purpose of the function clearer: it is not about the
      version of QEMU that's running, but the version string exposed in the
      emulated hardware.
      
      Cc: Andrzej Zaborowski <balrogg@gmail.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: John Snow <jsnow@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <1446233769-7892-3-git-send-email-ehabkost@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      35c2c8dc
    • E
      pc: Set hw_version on all machine classes · de796d93
      Eduardo Habkost 提交于
      In 2012, QEMU had a bug where it exposed QEMU version information to the
      guest, meaning a QEMU upgrade would expose different hardware to the
      guest OS even if the same machine-type is being used.
      
      The bug was fixed by commit 93bfef4c, on
      all machines up to pc-1.0. But we kept introducing the same bug on all
      newer machines since then. That means we are breaking guest ABI every
      time QEMU was upgraded.
      
      Fix this by setting the hw_version on all PC machines, making sure the
      hardware won't change when upgrading QEMU.
      
      Note that QEMU_VERSION was "1.0" in QEMU 1.0, but starting on QEMU
      1.1.0, it started following the "x.y.0" pattern. We have to follow it,
      to make sure we use the right QEMU_VERSION string from each QEMU
      release.
      
      The 2.5 machine classes could have hw_version unset, because the default
      value for qemu_get_version() is QEMU_VERSION. But I decided to set it
      explicitly to QEMU_VERSION so we don't forget to update it to "2.5.0"
      after we release 2.5.0 and create a 2.6 machine class.
      Reported-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <1446233769-7892-2-git-send-email-ehabkost@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      de796d93
    • P
      qemu-log: remove -d ioport · ddcc8e9d
      Paolo Bonzini 提交于
      It was disabled at compile-time, and is now replaced by tracepoints.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      ddcc8e9d
    • P
      ioport: do not use CPU_LOG_IOPORT · 6f94b7d9
      Paolo Bonzini 提交于
      These messages are disabled by default; a perfect usecase for tracepoints,
      which in fact already exist.  Add the missing information to them and
      stop using qemu_log_mask.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      6f94b7d9
    • P
      target-i386: fix pcmpxstrx equal-ordered (strstr) mode · 54c54f8b
      Paolo Bonzini 提交于
      In this mode, referring an invalid element of the source forces the
      result to false (table 4-7, last column) but referring an invalid
      element of the destination forces the result to true, so the outer
      loop should still be run even if some elements of the destination
      will be invalid.  They will be avoided in the inner loop, which
      correctly bounds "i" to validd, but they will still contribute to a
      positive outcome of the search.
      
      This fixes tst_strstr in glibc 2.17.
      Reported-by: NFlorian Weimer <fweimer@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      54c54f8b
  3. 02 11月, 2015 2 次提交
  4. 29 10月, 2015 19 次提交
  5. 28 10月, 2015 6 次提交
    • P
      Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging · 496feddd
      Peter Maydell 提交于
      target-i386: finally enable "check" mode by default
      
      # gpg: Signature made Wed 28 Oct 2015 14:13:10 GMT using RSA key ID 984DC5A6
      # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
      
      * remotes/ehabkost/tags/x86-pull-request:
        target-i386: Enable "check" mode by default
        target-i386: Don't left shift negative constant
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      496feddd
    • P
      Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-signed' into staging · 739680da
      Peter Maydell 提交于
      Update OpenBIOS images
      
      # gpg: Signature made Wed 28 Oct 2015 00:02:46 GMT using RSA key ID AE0F321F
      # gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>"
      
      * remotes/mcayland/tags/qemu-openbios-signed:
        Update OpenBIOS images
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      739680da
    • M
      Update OpenBIOS images · 637016c2
      Mark Cave-Ayland 提交于
      Update OpenBIOS images to SVN r1353 built from submodule.
      Signed-off-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      637016c2
    • E
      target-i386: Enable "check" mode by default · 15e41345
      Eduardo Habkost 提交于
      Current default behavior of QEMU is to silently disable features that
      are not supported by the host when a CPU model is requested in the
      command-line. This means that in addition to risking breaking guest ABI
      by default, we are silent about it.
      
      I would like to enable "enforce" by default, but this can easily break
      existing production systems because of the way libvirt makes assumptions
      about CPU models today (this will change in the future, once QEMU
      provide a proper interface for checking if a CPU model is runnable).
      
      But there's no reason we should be silent about it. So, change
      target-i386 to enable "check" mode by default so at least we have some
      warning printed to stderr (and hopefully logged somewhere) when QEMU
      disables a feature that is not supported by the host system.
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      15e41345
    • E
      target-i386: Don't left shift negative constant · 712b4243
      Eduardo Habkost 提交于
      Left shift of negative values is undefined behavior. Detected by clang:
        qemu/target-i386/translate.c:2423:26: runtime error:
          left shift of negative value -8
      
      This changes the code to reverse the sign after the left shift.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      712b4243
    • P
      Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20151027-1' into staging · c012e1b7
      Peter Maydell 提交于
      target-arm queue:
       * more EL2 preparation: handling for stage 2 translations
       * standardize debug macros in i.MX devices
       * improve error message in a corner case for virt board
       * disable live migration of KVM GIC if the kernel can't handle it
       * add SPSR_(ABT|UND|IRQ|FIQ) registers
       * handle non-executable page-straddling Thumb instructions
       * fix a "no 64-bit EL2" assumption in arm_excp_unmasked()
      
      # gpg: Signature made Tue 27 Oct 2015 16:03:31 GMT using RSA key ID 14360CDE
      # 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>"
      
      * remotes/pmaydell/tags/pull-target-arm-20151027-1: (27 commits)
        target-arm: Add support for S1 + S2 MMU translations
        target-arm: Route S2 MMU faults to EL2
        target-arm: Add S2 translation to 32bit S1 PTWs
        target-arm: Add S2 translation to 64bit S1 PTWs
        target-arm: Add ARMMMUFaultInfo
        target-arm: Avoid inline for get_phys_addr
        target-arm: Add support for S2 page-table protection bits
        target-arm: Add computation of starting level for S2 PTW
        target-arm: lpae: Rename granule_sz to stride
        target-arm: lpae: Replace tsz with computed inputsize
        target-arm: Add support for AArch32 S2 negative t0sz
        target-arm: lpae: Move declaration of t0sz and t1sz
        target-arm: lpae: Make t0sz and t1sz signed integers
        target-arm: Add HPFAR_EL2
        i.MX: Standardize i.MX GPT debug
        i.MX: Standardize i.MX EPIT debug
        i.MX: Standardize i.MX FEC debug
        i.MX: Standardize i.MX CCM debug
        i.MX: Standardize i.MX AVIC debug
        i.MX: Standardize i.MX I2C debug
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      c012e1b7