1. 26 2月, 2015 1 次提交
    • L
      qemu: fix ifindex array reported to systemd · 4bbe1029
      Laine Stump 提交于
      Commit f7afeddc added code to report to systemd an array of interface
      indexes for all tap devices used by a guest. Unfortunately it not only
      didn't add code to report the ifindexes for macvtap interfaces
      (interface type='direct') or the tap devices used by type='ethernet',
      it ended up sending "-1" as the ifindex for each macvtap or hostdev
      interface. This resulted in a failure to start any domain that had a
      macvtap or hostdev interface (or actually any type other than
      "network" or "bridge").
      
      This patch does the following with the nicindexes array:
      
      1) Modify qemuBuildInterfaceCommandLine() to only fill in the
      nicindexes array if given a non-NULL pointer to an array (and modifies
      the test jig calls to the function to send NULL). This is because
      there are tests in the test suite that have type='ethernet' and still
      have an ifname specified, but that device of course doesn't actually
      exist on the test system, so attempts to call virNetDevGetIndex() will
      fail.
      
      2) Even then, only add an entry to the nicindexes array for
      appropriate types, and to do so for all appropriate types ("network",
      "bridge", and "direct"), but only if the ifname is known (since that
      is required to call virNetDevGetIndex().
      4bbe1029
  2. 25 2月, 2015 1 次提交
  3. 24 2月, 2015 1 次提交
  4. 21 2月, 2015 9 次提交
  5. 17 2月, 2015 2 次提交
    • P
      PowerPC : Forbid NULL CPU model with 'host-model' mode. · 5e4f49ab
      Prerna Saxena 提交于
      PowerPC : Forbid NULL CPU model with 'host-model' mode in qemu command line.
      
      This ensures that an XML such as following:
      ...
        <cpu mode='host-model'>
          <model fallback='allow'/>
        </cpu>
      ...
      
      will not generate a '-cpu host,compat=(null)' command line with qemu-system-ppc64.
      Signed-off-by: NPrerna Saxena <prerna@linux.vnet.ibm.com>
      5e4f49ab
    • M
      qemuBuildMemoryBackendStr: Report backend requirement more appropriately · 7832fac8
      Michal Privoznik 提交于
      So, when building the '-numa' command line, the
      qemuBuildMemoryBackendStr() function does quite a lot of checks to
      chose the best backend, or to check if one is in fact needed. However,
      it returned that backend is needed even for this little fella:
      
        <numatune>
          <memory mode="strict" nodeset="0,2"/>
        </numatune>
      
      This can be guaranteed via CGroups entirely, there's no need to use
      memory-backend-ram to let qemu know where to get memory from. Well, as
      long as there's no <memnode/> element, which explicitly requires the
      backend. Long story short, we wouldn't have to care, as qemu works
      either way. However, the problem is migration (as always). Previously,
      libvirt would have started qemu with:
      
        -numa node,memory=X
      
      in this case and restricted memory placement in CGroups. Today, libvirt
      creates more complicated command line:
      
        -object memory-backend-ram,id=ram-node0,size=X
        -numa node,memdev=ram-node0
      
      Again, one wouldn't find anything wrong with these two approaches.
      Both work just fine. Unless you try to migrated from the older libvirt
      into the newer one. These two approaches are, unfortunately, not
      compatible. My suggestion is, in order to allow users to migrate, lets
      use the older approach for as long as the newer one is not needed.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      7832fac8
  6. 13 2月, 2015 1 次提交
  7. 10 2月, 2015 7 次提交
  8. 06 2月, 2015 1 次提交
  9. 03 2月, 2015 1 次提交
  10. 31 1月, 2015 7 次提交
    • P
      qemu: command: Don't combine old and modern NUMA node creation · b92a0037
      Peter Krempa 提交于
      Change done by commit f309db1f wrongly
      assumes that qemu can start with a combination of NUMA nodes specified
      with the "memdev" option and the appropriate backends, and the legacy
      way by specifying only "mem" as a size argument. QEMU rejects such
      commandline though:
      
      $ /usr/bin/qemu-system-x86_64 -S -M pc -m 1024 -smp 2 \
      -numa node,nodeid=0,cpus=0,mem=256 \
      -object memory-backend-ram,id=ram-node1,size=12345 \
      -numa node,nodeid=1,cpus=1,memdev=ram-node1
      qemu-system-x86_64: -numa node,nodeid=1,cpus=1,memdev=ram-node1: qemu: memdev option must be specified for either all or no nodes
      
      To fix this issue we need to check if any of the nodes requires the new
      definition with the backend and if so, then all other nodes have to use
      it too.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1182467
      b92a0037
    • P
      qemu: command: Refactor NUMA backend object formatting to use JSON objs · 8795adf7
      Peter Krempa 提交于
      With the new JSON to argv formatter we are now able to represent the
      memory backend definitions in the JSON object format that is reusable
      for monitor use (hotplug) and then convert it into the shell string.
      This will avoid having two separate instances of the same code that
      would create the different formats.
      
      Previous refactors now allow to make this step without changes to the
      test suite.
      8795adf7
    • P
      qemu: command: Switch to bytes when formatting size for memory backends · b50b4ef3
      Peter Krempa 提交于
      QEMU's command line visitor as well as the JSON interface take bytes by
      default for memory object sizes. Convert mebibytes to bytes so that we
      can later refactor the existing code for hotplug purposes.
      b50b4ef3
    • P
      qemu: command: Unify values for boolean values when formating memory backends · a47174c5
      Peter Krempa 提交于
      QEMU's qapi visitor code allows yes/on/y for true and no/off/n for false
      value of boolean properities. Unify the used style so that we can
      generate it later and fix test cases.
      a47174c5
    • P
      qemu: command: Shuffle around formating of alias for memory backend objs · 172100ac
      Peter Krempa 提交于
      Move the alias as the second formated argument and tweak the tests so
      that a future refactor that will change the order doesn't break tests.
      172100ac
    • P
      qemu: Extract code to setup memory backing objects · db3b1c4a
      Peter Krempa 提交于
      Extract the memory backend device code into a separate function so that
      it can be later easily refactored and reused.
      
      Few small changes for future reusability, namely:
      - new (currently unused) parameter for user specified page size
      - size of the memory is specified in kibibytes, divided up in the
      function
      - new (currently unused) parameter for user specifed source nodeset
      - option to enforce capability check
      db3b1c4a
    • P
      qemu: command: Add helper to format -object strings from JSON representation · 331b2583
      Peter Krempa 提交于
      Unlike -device, qemu uses a JSON object to add backend "objects" via the
      monitor rather than the string that would be passed on the commandline.
      
      To be able to reuse code parts that configure backends for various
      devices, this patch adds a helper that will allow generating the command
      line representations from the JSON property object.
      331b2583
  11. 27 1月, 2015 2 次提交
  12. 23 1月, 2015 7 次提交