1. 10 2月, 2015 7 次提交
  2. 06 2月, 2015 1 次提交
  3. 03 2月, 2015 1 次提交
  4. 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
  5. 27 1月, 2015 2 次提交
  6. 23 1月, 2015 7 次提交
  7. 22 1月, 2015 1 次提交
  8. 21 1月, 2015 1 次提交
  9. 16 1月, 2015 4 次提交
  10. 15 1月, 2015 1 次提交
  11. 14 1月, 2015 1 次提交
  12. 13 1月, 2015 1 次提交
  13. 12 1月, 2015 1 次提交
    • P
      qxl: change the default value for vgamem_mb to 16 MiB · 0e502466
      Pavel Hrdina 提交于
      The default value should be 16 MiB instead of 8 MiB. Only really old
      version of upstream QEMU used the 8 MiB as default for vga framebuffer.
      
      Without this change if you update your libvirt where we introduced the
      "vgamem" attribute for QXL video device the value will be set to 8 MiB,
      but previously your guest had 16 MiB because we didn't pass any value to
      QEMU command line which means QEMU used its own 16 MiB as default.
      
      This will affect all users with guest's display resolution higher than
      1920x1080.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      0e502466
  14. 08 1月, 2015 1 次提交
    • M
      qemu: Fix system pages handling in <memoryBacking/> · 732586d9
      Michal Privoznik 提交于
      In one of my previous commits (311b4a67) I've tried to allow to
      pass regular system pages to <hugepages>. However, there was a
      little bug that wasn't caught. If domain has guest NUMA topology
      defined, qemuBuildNumaArgStr() function takes care of generating
      corresponding command line. The hugepages backing for guest NUMA
      nodes is handled there too. And here comes the bug: the hugepages
      setting from XML is stored in KiB internally, however, the system
      pages size was queried and stored in Bytes. So the check whether
      these two are equal was failing even if it shouldn't.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      732586d9
  15. 19 12月, 2014 1 次提交
    • M
      qemu: Create memory-backend-{ram,file} iff needed · f309db1f
      Michal Privoznik 提交于
      Libvirt BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1175397
      QEMU BZ:    https://bugzilla.redhat.com/show_bug.cgi?id=1170093
      
      In qemu there are two interesting arguments:
      
      1) -numa to create a guest NUMA node
      2) -object memory-backend-{ram,file} to tell qemu which memory
      region on which host's NUMA node it should allocate the guest
      memory from.
      
      Combining these two together we can instruct qemu to create a
      guest NUMA node that is tied to a host NUMA node. And it works
      just fine. However, depending on machine type used, there might
      be some issued during migration when OVMF is enabled (see QEMU
      BZ). While this truly is a QEMU bug, we can help avoiding it. The
      problem lies within the memory backend objects somewhere. Having
      said that, fix on our side consists on putting those objects on
      the command line if and only if needed. For instance, while
      previously we would construct this (in all ways correct) command
      line:
      
          -object memory-backend-ram,size=256M,id=ram-node0 \
          -numa node,nodeid=0,cpus=0,memdev=ram-node0
      
      now we create just:
      
          -numa node,nodeid=0,cpus=0,mem=256
      
      because the backend object is obviously not tied to any specific
      host NUMA node.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      f309db1f
  16. 17 12月, 2014 1 次提交
  17. 15 12月, 2014 2 次提交
    • L
      qemu: add/remove bridge fdb entries as guest CPUs are started/stopped · 44292e48
      Laine Stump 提交于
      When libvirt is managing a bridge's forwarding database (FDB)
      (macTableManager='libvirt'), if we add FDB entries for a new guest
      interface even before the qemu process is created, then in the case of
      a migration any other guest attached to the "destination" bridge will
      have its traffic immediately sent to the destination of the migration
      even while the source domain is still running (and the destination, of
      course, isn't). To make sure that traffic from other guests on the new
      host continues flowing to the old guest until the new one is ready, we
      have to wait until the new guest CPUs are started to add the FDB
      entries.
      
      Conversely, we need to remove the FDB entries from the bridge any time
      the guest CPUs are stopped; among other things, this will assure
      proper operation during a post-copy migration (which is just the
      opposite of the problem described in the previous paragraph).
      44292e48
    • M
      qemu: Allow system pages to <memoryBacking/> · 311b4a67
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1173507
      
      It occurred to me that OpenStack uses the following XML when not using
      regular huge pages:
      
        <memoryBacking>
          <hugepages>
            <page size='4' unit='KiB'/>
          </hugepages>
        </memoryBacking>
      
      However, since we are expecting to see huge pages only, we fail to
      startup the domain with following error:
      
        libvirtError: internal error: Unable to find any usable hugetlbfs
        mount for 4 KiB
      
      While regular system pages are not huge pages technically, our code is
      prepared for that and if it helps OpenStack (or other management
      applications) we should cope with that.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      311b4a67