1. 29 7月, 2016 1 次提交
  2. 28 7月, 2016 2 次提交
    • P
      Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging · 21a21b85
      Peter Maydell 提交于
      x86 and machine queue, 2016-07-27
      
      Highlights:
      * Fixes to allow CPU hotplug/unplug in any order;
      * Exit QEMU on invalid global properties.
      
      # gpg: Signature made Wed 27 Jul 2016 15:28:53 BST
      # gpg:                using RSA key 0x2807936F984DC5A6
      # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
      # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6
      
      * remotes/ehabkost/tags/x86-pull-request:
        vl: exit if a bad property value is passed to -global
        qdev: ignore GlobalProperty.errp for hotplugged devices
        machine: Add comment to abort path in machine_set_kernel_irqchip
        Revert "pc: Enforce adding CPUs contiguously and removing them in opposite order"
        pc: Init CPUState->cpu_index with index in possible_cpus[]
        qdev: Fix object reference leak in case device.realize() fails
        exec: Set cpu_index only if it's not been explictly set
        exec: Don't use cpu_index to detect if cpu_exec_init()'s been called
        exec: Reduce CONFIG_USER_ONLY ifdeffenery
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      21a21b85
    • P
      Merge remote-tracking branch... · 51313fe4
      Peter Maydell 提交于
      Merge remote-tracking branch 'remotes/stefanha/tags/CVE-2016-5403-virtio-unbounded-allocation-pull-request' into staging
      
      # gpg: Signature made Wed 27 Jul 2016 16:13:02 BST
      # gpg:                using RSA key 0x9CA4ABB381AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
      # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
      
      * remotes/stefanha/tags/CVE-2016-5403-virtio-unbounded-allocation-pull-request:
        virtio: error out if guest exceeds virtqueue size
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      51313fe4
  3. 27 7月, 2016 15 次提交
  4. 26 7月, 2016 9 次提交
    • D
      block: export LUKS specific data to qemu-img info · c7c4cf49
      Daniel P. Berrange 提交于
      The qemu-img info command has the ability to expose format
      specific metadata about volumes. Wire up this facility for
      the LUKS driver to report on cipher configuration and key
      slot usage.
      
          $ qemu-img info ~/VirtualMachines/demo.luks
          image: /home/berrange/VirtualMachines/demo.luks
          file format: luks
          virtual size: 98M (102760448 bytes)
          disk size: 100M
          encrypted: yes
          Format specific information:
              ivgen alg: plain64
              hash alg: sha1
              cipher alg: aes-128
              uuid: 6ddee74b-3a22-408c-8909-6789d4fa2594
              cipher mode: xts
              slots:
                  [0]:
                      active: true
                      iters: 572706
                      key offset: 4096
                      stripes: 4000
                  [1]:
                      active: false
                      key offset: 135168
                  [2]:
                      active: false
                      key offset: 266240
                  [3]:
                      active: false
                      key offset: 397312
                  [4]:
                      active: false
                      key offset: 528384
                  [5]:
                      active: false
                      key offset: 659456
                  [6]:
                      active: false
                      key offset: 790528
                  [7]:
                      active: false
                      key offset: 921600
              payload offset: 2097152
              master key iters: 142375
      
      One somewhat undesirable artifact is that the data fields are
      printed out in (apparently) random order. This will be addressed
      later by changing the way the block layer pretty-prints the
      image specific data.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 1469192015-16487-3-git-send-email-berrange@redhat.com
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      c7c4cf49
    • D
      crypto: add support for querying parameters for block encryption · 40c85028
      Daniel P. Berrange 提交于
      When creating new block encryption volumes, we accept a list of
      parameters to control the formatting process. It is useful to
      be able to query what those parameters were for existing block
      devices. Add a qcrypto_block_get_info() method which returns a
      QCryptoBlockInfo instance to report this data.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 1469192015-16487-2-git-send-email-berrange@redhat.com
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      40c85028
    • C
      AioContext: correct comments · 54a16a63
      Cao jin 提交于
      Correct comments of field notify_me
      
      Cc: Kevin Wolf <kwolf@redhat.com>
      Cc: Max Reitz <mreitz@redhat.com>
      Signed-off-by: NCao jin <caoj.fnst@cn.fujitsu.com>
      Message-id: 1468575858-22975-1-git-send-email-caoj.fnst@cn.fujitsu.com
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      54a16a63
    • V
      qcow2: do not allocate extra memory · ebf7bba0
      Vladimir Sementsov-Ogievskiy 提交于
      There are no needs to allocate more than one cluster, as we set
      avail_out for deflate to one cluster.
      
      Zlib docs (http://www.zlib.net/manual.html) says:
      "deflate compresses as much data as possible, and stops when the input
      buffer becomes empty or the output buffer becomes full."
      
      So, deflate will not write more than avail_out to output buffer. If
      there is not enough space in output buffer for compressed data (it may
      be larger than input data) deflate just returns Z_OK. (if all data is
      compressed and written to output buffer deflate returns Z_STREAM_END).
      Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-id: 1468515565-81313-1-git-send-email-vsementsov@virtuozzo.com
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      ebf7bba0
    • P
      Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.7-20160726' into staging · f49ee630
      Peter Maydell 提交于
      ppc patch queue 2016-07-26
      
      Here's the current batch of ppc and spapr related patches intended for
      qemu-2.7.  Given the late stage in 2.7 development, these are all
      bugfixes with one exception:
      
      The "spapr: disintricate core-id from DT semantics" changes the way
      ids are assigned in the new core-based hotplug infrastructure.  This
      isn't strictly a bugfix, but we've determined that the current way of
      assigning core-ids will cause considerable grief with future plans for
      cpu hotplug.  Therefore it's better to fix this now, late in 2.7,
      before we have a released version with the problematic numbering.
      
      # gpg: Signature made Tue 26 Jul 2016 04:04:57 BST
      # gpg:                using RSA key 0x6C38CACA20D9B392
      # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
      # gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>"
      # gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>"
      # gpg: WARNING: This key is not certified with sufficiently trusted signatures!
      # gpg:          It is not certain that the signature belongs to the owner.
      # Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392
      
      * remotes/dgibson/tags/ppc-for-2.7-20160726:
        spapr: disintricate core-id from DT semantics
        target-ppc: add PPC_MFTB flag to e500mc and e5500
        spapr: fix spapr-nvram migration
        hw/ppc/spapr: Make sure to close the htab_fd when migration is canceled
        ppc: Huge page detection mechanism fixes - Episode III
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      f49ee630
    • P
      Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2016-07-25-tag' into staging · a467bb99
      Peter Maydell 提交于
      qemu-ga patch queue for 2.7
      
      * fix w32 build failures due to -Werror when building with VSS/fsfreeze
        enabled
      * fix leaking for qemu-ga config files in `make check`
      
      # gpg: Signature made Mon 25 Jul 2016 20:01:09 BST
      # gpg:                using RSA key 0x3353C9CEF108B584
      # gpg: Good signature from "Michael Roth <flukshun@gmail.com>"
      # gpg:                 aka "Michael Roth <mdroth@utexas.edu>"
      # gpg:                 aka "Michael Roth <mdroth@linux.vnet.ibm.com>"
      # Primary key fingerprint: CEAC C9E1 5534 EBAB B82D  3FA0 3353 C9CE F108 B584
      
      * remotes/mdroth/tags/qga-pull-2016-07-25-tag:
        configure: mark qemu-ga VSS includes as system headers
        tests: use static qga config file
        build-sys: link tests/data
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      a467bb99
    • M
      configure: mark qemu-ga VSS includes as system headers · 690604f6
      Michael Roth 提交于
      As of e4650c81, we do w32 builds with -Werror enabled. Unfortunately
      for cases where we enable VSS support in qemu-ga, we still have
      warnings generated by VSS includes that ship as part of the Microsoft
      VSS SDK.
      
      We can selectively address a number of these warnings using
      
        #pragma GCC diagnostic ignored ...
      
      but at least one of these:
      
        warning: ‘typedef’ was ignored in this declaration
      
      resulting from declarations of the form:
      
        typedef struct Blah { ... };
      
      does not provide a specific command-line/pragma option to disable
      warnings of the sort.
      
      To allow VSS builds to succeed, the next-best option is disabling
      these warnings on a per-file basis. pragmas like #pragma GCC
      system_header can be used to declare subsequent includes/declarations
      as being exempt from normal warnings, but this must be done within
      a header file.
      
      Since we don't control the VSS SDK, we'd need to rely on a
      intermediate header include to accomplish this, and
      since different objects in the VSS link target rely on different
      headers from the VSS SDK, this would become somewhat of a rat's nest
      (though not totally unmanageable).
      
      The next step up in granularity is just marking the entire VSS
      SDK include path as system headers via -isystem. This is a bit more
      heavy-handed, but since this SDK hasn't changed since 2005, there's
      likely little to be gained from selectively disabling warnings
      anyway, so we implement that approach here.
      
      This fixes the -Werror failures in both the configure test and the
      qga build due to shared reliance on $vss_win32_include. For the
      same reason, this also enforces a new dependency on -isystem support
      in the C/C++ compiler when building QGA with VSS enabled.
      
      Cc: Thomas Huth <thuth@redhat.com>
      Cc: Stefan Weil <sw@weilnetz.de>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      690604f6
    • M
      tests: use static qga config file · 1741b945
      Marc-André Lureau 提交于
      Do not create a leaking temporary file, but use a static file instead.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reported-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      1741b945
    • M
      build-sys: link tests/data · fe31017f
      Marc-André Lureau 提交于
      Link a common tests data directory to the build directory.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      fe31017f
  5. 25 7月, 2016 5 次提交
  6. 22 7月, 2016 8 次提交
    • P
      Update version for v2.7.0-rc0 release · 2d2e632a
      Peter Maydell 提交于
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      2d2e632a
    • P
      target-sh4: Use glib allocator in movcal helper · 01a72012
      Peter Maydell 提交于
      Coverity spots that helper_movcal() calls malloc() but doesn't
      check for failure. Fix this by switching to the glib allocation
      functions, which abort on allocation failure.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1468327859-21385-1-git-send-email-peter.maydell@linaro.org
      Acked-by: NAurelien Jarno <aurelien@aurel32.net>
      01a72012
    • P
      Merge remote-tracking branch 'remotes/amit-migration/tags/migration-for-2.7-6' into staging · e3643d32
      Peter Maydell 提交于
      Migration:
      - Fix a postcopy bug
      - Add a testsuite for measuring migration performance
      
      # gpg: Signature made Fri 22 Jul 2016 08:56:44 BST
      # 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.7-6:
        tests: introduce a framework for testing migration performance
        scripts: ensure monitor socket has SO_REUSEADDR set
        scripts: set timeout when waiting for qemu monitor connection
        scripts: refactor the VM class in iotests for reuse
        scripts: add a 'debug' parameter to QEMUMonitorProtocol
        scripts: add __init__.py file to scripts/qmp/
        migration: set state to post-migrate on failure
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      e3643d32
    • D
      tests: introduce a framework for testing migration performance · 409437e1
      Daniel P. Berrange 提交于
      This introduces a moderately general purpose framework for
      testing performance of migration.
      
      The initial guest workload is provided by the included 'stress'
      program, which is configured to spawn one thread per guest CPU
      and run a maximally memory intensive workload. It will loop
      over GB of memory, xor'ing each byte with data from a 4k array
      of random bytes. This ensures heavy read and write load across
      all of guest memory to stress the migration performance. While
      running the 'stress' program will record how long it takes to
      xor each GB of memory and print this data for later reporting.
      
      The test engine will spawn a pair of QEMU processes, either on
      the same host, or with the target on a remote host via ssh,
      using the host kernel and a custom initrd built with 'stress'
      as the /init binary. Kernel command line args are set to ensure
      a fast kernel boot time (< 1 second) between launching QEMU and
      the stress program starting execution.
      
      None the less, the test engine will initially wait N seconds for
      the guest workload to stablize, before starting the migration
      operation. When migration is running, the engine will use pause,
      post-copy, autoconverge, xbzrle compression and multithread
      compression features, as well as downtime & bandwidth tuning
      to encourage completion. If migration completes, the test engine
      will wait N seconds again for the guest workooad to stablize on
      the target host. If migration does not complete after a preset
      number of iterations, it will be aborted.
      
      While the QEMU process is running on the source host, the test
      engine will sample the host CPU usage of QEMU as a whole, and
      each vCPU thread. While migration is running, it will record
      all the stats reported by 'query-migration'. Finally, it will
      capture the output of the stress program running in the guest.
      
      All the data produced from a single test execution is recorded
      in a structured JSON file. A separate program is then able to
      create interactive charts using the "plotly" python + javascript
      libraries, showing the characteristics of the migration.
      
      The data output provides visualization of the effect on guest
      vCPU workloads from the migration process, the corresponding
      vCPU utilization on the host, and the overall CPU hit from
      QEMU on the host. This is correlated from statistics from the
      migration process, such as downtime, vCPU throttling and iteration
      number.
      
      While the tests can be run individually with arbitrary parameters,
      there is also a facility for producing batch reports for a number
      of pre-defined scenarios / comparisons, in order to be able to
      get standardized results across different hardware configurations
      (eg TCP vs RDMA, or comparing different VCPU counts / memory
      sizes, etc).
      
      To use this, first you must build the initrd image
      
       $ make tests/migration/initrd-stress.img
      
      To run a a one-shot test with all default parameters
      
       $ ./tests/migration/guestperf.py > result.json
      
      This has many command line args for varying its behaviour.
      For example, to increase the RAM size and CPU count and
      bind it to specific host NUMA nodes
      
       $ ./tests/migration/guestperf.py \
             --mem 4 --cpus 2 \
             --src-mem-bind 0 --src-cpu-bind 0,1 \
             --dst-mem-bind 1 --dst-cpu-bind 2,3 \
             > result.json
      
      Using mem + cpu binding is strongly recommended on NUMA
      machines, otherwise the guest performance results will
      vary wildly between runs of the test due to lucky/unlucky
      NUMA placement, making sensible data analysis impossible.
      
      To make it run across separate hosts:
      
       $ ./tests/migration/guestperf.py \
             --dst-host somehostname > result.json
      
      To request that post-copy is enabled, with switchover
      after 5 iterations
      
       $ ./tests/migration/guestperf.py \
             --post-copy --post-copy-iters 5 > result.json
      
      Once a result.json file is created, a graph of the data
      can be generated, showing guest workload performance per
      thread and the migration iteration points:
      
       $ ./tests/migration/guestperf-plot.py --output result.html \
              --migration-iters --split-guest-cpu result.json
      
      To further include host vCPU utilization and overall QEMU
      utilization
      
       $ ./tests/migration/guestperf-plot.py --output result.html \
              --migration-iters --split-guest-cpu \
      	--qemu-cpu --vcpu-cpu result.json
      
      NB, the 'guestperf-plot.py' command requires that you have
      the plotly python library installed. eg you must do
      
       $ pip install --user  plotly
      
      Viewing the result.html file requires that you have the
      plotly.min.js file in the same directory as the HTML
      output. This js file is installed as part of the plotly
      python library, so can be found in
      
        $HOME/.local/lib/python2.7/site-packages/plotly/offline/plotly.min.js
      
      The guestperf-plot.py program can accept multiple json files
      to plot, enabling results from different configurations to
      be compared.
      
      Finally, to run the entire standardized set of comparisons
      
        $ ./tests/migration/guestperf-batch.py \
             --dst-host somehost \
             --mem 4 --cpus 2 \
             --src-mem-bind 0 --src-cpu-bind 0,1 \
             --dst-mem-bind 1 --dst-cpu-bind 2,3
             --output tcp-somehost-4gb-2cpu
      
      will store JSON files from all scenarios in the directory
      named tcp-somehost-4gb-2cpu
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1469020993-29426-7-git-send-email-berrange@redhat.com>
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      409437e1
    • D
      scripts: ensure monitor socket has SO_REUSEADDR set · 168ae6c2
      Daniel P. Berrange 提交于
      If tests use a TCP based monitor socket, the connection will
      go into a TIMED_WAIT state when the test exits. This will
      randomly prevent the test from being re-run without a certain
      time period. Set the SO_REUSEADDR flag on the socket to ensure
      we can immediately re-run the tests
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1469020993-29426-6-git-send-email-berrange@redhat.com>
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      168ae6c2
    • D
      scripts: set timeout when waiting for qemu monitor connection · 23806462
      Daniel P. Berrange 提交于
      If QEMU fails to launch for some reason, the QEMUMonitorProtocol
      class accept() method will wait forever in a socket accept call.
      Set a timeout of 15 seconds so that we fail more gracefully
      instead of hanging the test script forever
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1469020993-29426-5-git-send-email-berrange@redhat.com>
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      23806462
    • D
      scripts: refactor the VM class in iotests for reuse · 66613974
      Daniel P. Berrange 提交于
      The iotests module has a python class for controlling QEMU
      processes. Pull the generic functionality out of this file
      and create a scripts/qemu.py module containing a QEMUMachine
      class. Put the QTest integration support into a subclass
      QEMUQtestMachine.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1469020993-29426-4-git-send-email-berrange@redhat.com>
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      66613974
    • D
      scripts: add a 'debug' parameter to QEMUMonitorProtocol · 991e7c46
      Daniel P. Berrange 提交于
      Add a 'debug' parameter to the QEMUMonitorProtocol class
      which will cause it to print out all JSON strings on
      sys.stderr
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1469020993-29426-3-git-send-email-berrange@redhat.com>
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      991e7c46