1. 31 1月, 2015 1 次提交
  2. 30 1月, 2015 1 次提交
    • M
      conf: Don't mangle vcpu placement randomly · bbd3eb50
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1170492
      
      In one of our previous commits (dc8b7ce7) we've done a functional
      change even though it was intended as pure refactor. The problem is,
      that the following XML:
      
       <vcpu placement='static' current='2'>6</vcpu>
       <cputune>
         <emulatorpin cpuset='1-3'/>
       </cputune>
       <numatune>
         <memory mode='strict' placement='auto'/>
       </numatune>
      
      gets translated into this one:
      
       <vcpu placement='auto' current='2'>6</vcpu>
       <cputune>
         <emulatorpin cpuset='1-3'/>
       </cputune>
       <numatune>
         <memory mode='strict' placement='auto'/>
       </numatune>
      
      We should not change the vcpu placement mode. Moreover, we're doing
      something similar in case of emulatorpin and iothreadpin. If they were
      set, but vcpu placement was auto, we've mistakenly removed them from
      the domain XML even though we are able to set them independently on
      vcpus.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      bbd3eb50
  3. 29 1月, 2015 1 次提交
    • M
      schemas: Allow all generic elements and attributes for all interfaces · 52222568
      Michal Privoznik 提交于
      There are some interface types (notably 'server' and 'client')
      which instead of allowing the default set of elements and
      attributes (like the rest do), try to enumerate only the elements
      they know of. This way it's, however, easy to miss something. For
      instance, the <address/> element was not mentioned at all. This
      resulted in a strange behavior: when such interface was added
      into XML, the address was automatically generated by parsing
      code. Later, the formatted XML hasn't passed the RNG schema. This
      became more visible once we've turned on the XML validation on
      domain XML changes: appending an empty line at the end of
      formatted XML (to trick virsh think the XML had changed) made
      libvirt to refuse the very same XML it formatted.
      
      Instead of trying to find each element and attribute we are
      missing in the schema, lets just allow all the elements and
      attributes like we're doing that for the rest of types. It's no
      harm if the schema is wider than our parser allows.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      52222568
  4. 21 1月, 2015 1 次提交
  5. 19 1月, 2015 1 次提交
  6. 16 1月, 2015 3 次提交
  7. 13 1月, 2015 1 次提交
  8. 12 1月, 2015 1 次提交
  9. 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
  10. 15 12月, 2014 1 次提交
    • 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
  11. 11 12月, 2014 1 次提交
  12. 25 11月, 2014 4 次提交
    • P
      qemu-command: introduce new vgamem attribute for QXL video device · 742d49fa
      Pavel Hrdina 提交于
      Add attribute to set vgamem_mb parameter of QXL device for QEMU. This
      value sets the size of VGA framebuffer for QXL device. Default value in
      QEMU is 8MB so reuse it also in libvirt to not break things.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1076098Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      742d49fa
    • P
      qemu-command: use vram attribute for all video devices · 24c6ca86
      Pavel Hrdina 提交于
      So far we didn't have any option to set video memory size for qemu video
      devices. There was only the vram (ram for QXL) attribute but it was valid
      only for the QXL video device.
      
      To provide this feature to users QEMU has a dedicated device attribute
      called 'vgamem_mb' to set the video memory size. We will use the 'vram'
      attribute for setting video memory size for other QEMU video devices.
      
      For the cirrus device we will ignore the vram value because it has
      hardcoded video size in QEMU.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1076098Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      24c6ca86
    • P
      QXL: fix setting ram and vram values for QEMU QXL device · c32cfc6d
      Pavel Hrdina 提交于
      QEMU has two different type of QXL display device. The first "qxl-vga"
      is for primary video device and second "qxl" is for secondary video
      device.
      
      There are also two different ways how to specify those devices on qemu
      command line, the first one and obsolete is using "-vga" option and the
      current new one is using "-device" option. The "-vga" could be used only
      to setup primary video device, so the "-vga qxl" equal to
      "-device qxl-vga". Unfortunately the "-vga qxl" doesn't support setting
      additional parameters for the device and "-global" option must be used
      for this purpose. It's mandatory to use "-global qxl-vga...." to set the
      parameters of primary video device previously defined with "-vga qxl".
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1076098Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      c32cfc6d
    • P
      video: cleanup usage of vram attribute and update documentation · 81ba2298
      Pavel Hrdina 提交于
      The vram attribute was introduced to set the video memory but it is
      usable only for few hypervisors excluding QEMU/KVM and the old XEN
      driver. Only in case of QEMU the vram was used for QXL.
      
      This patch updates the documentation to reflect current code in libvirt
      and also changes the cases when we will set the default vram attribute.
      It also fixes existing strange default value for VGA devices 9MB to 16MB
      because the video ram should be rounded to power of two.
      
      The change of default value could affect migrations but I found out that
      QEMU always round the video ram to power of two internally so it's safe
      to change the default value to the next closest power of two and also
      silently correct every domain XML definition. And it's also safe because
      we don't pass the value to QEMU.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1076098Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      81ba2298
  13. 21 11月, 2014 4 次提交
  14. 15 11月, 2014 1 次提交
  15. 10 11月, 2014 1 次提交
  16. 07 11月, 2014 1 次提交
  17. 06 11月, 2014 1 次提交
  18. 04 11月, 2014 1 次提交
  19. 25 10月, 2014 1 次提交
  20. 20 10月, 2014 1 次提交
  21. 06 10月, 2014 1 次提交
    • L
      conf: add trustGuestRxFilters attribute to network and domain interface · 07450cd4
      Laine Stump 提交于
      This new attribute will control whether or not libvirt will pay
      attention to guest notifications about changes to network device mac
      addresses and receive filters. The default for this is 'no' (for
      security reasons). If it is set to 'yes' *and* the specified device
      model and connection support it (currently only macvtap+virtio) then
      libvirt will watch for NIC_RX_FILTER_CHANGED events, and when it
      receives one, it will issue a query-rx-filter command, retrieve the
      result, and modify the host-side macvtap interface's mac address and
      unicast/multicast filters accordingly.
      
      The functionality behind this attribute will be in a later patch. This
      patch merely adds the attribute to the top-level of a domain's
      <interface> as well as to <network> and <portgroup>, and adds
      documentation and schema/xml2xml tests. Rather than adding even more
      test files, I've just added the net attribute in various applicable
      places of existing test files.
      07450cd4
  22. 04 10月, 2014 2 次提交
  23. 03 10月, 2014 1 次提交
    • C
      qemu: Don't compare CPU against host for TCG · 445a09bd
      Cole Robinson 提交于
      Right now when building the qemu command line, we try to do various
      unconditional validations of the guest CPU against the host CPU. However
      this checks are overly applied. The only time we should use the checks
      are:
      
      - The user requests host-model/host-passthrough, or
      
      - When KVM is requsted. CPU features requested in TCG mode are always
        emulated by qemu and are independent of the host CPU, so no host CPU
        checks should be performed.
      
      Right now if trying to specify a CPU for arm on an x86 host, it attempts
      to do non-sensical validation and falls over.
      
      Switch all the test cases that were intending to test CPU validation to
      use KVM, so they continue to test the intended code.
      
      Amend some aarch64 XML tests with a CPU model, to ensure things work
      correctly.
      445a09bd
  24. 26 9月, 2014 1 次提交
  25. 24 9月, 2014 2 次提交
    • J
      qemu: wire up virtio-net segment offloading options · 2d79e175
      Ján Tomko 提交于
      Format the segment offloading options specified by
      <driver>
        <host .../>
        <guest .../>
      </driver>
      on virtio-net command line.
      2d79e175
    • J
      conf: add options for disabling segment offloading · 5b3536ae
      Ján Tomko 提交于
      Add options for tuning segment offloading:
      <driver>
        <host csum='off' gso='off' tso4='off' tso6='off'
              ecn='off' ufo='off'/>
        <guest csum='off' tso4='off' tso6='off' ecn='off' ufo='off'/>
      </driver>
      which control the respective host_ and guest_ properties
      of the virtio-net device.
      5b3536ae
  26. 19 9月, 2014 2 次提交
  27. 18 9月, 2014 2 次提交
    • M
      qemu: Honor hugepages for UMA domains · 281f7001
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1135396
      
      There are two ways how to tell qemu to use huge pages. The first one
      is suitable for domains with NUMA nodes: the path to hugetlbfs mount
      is appended to NUMA node definition on the command line. The second
      one is suitable for UMA domains: here there's this global '-mem-path'
      argument that accepts path to the hugetlbfs mount point. However, the
      latter case was not used for all the cases that it should be. For
      instance:
      
        <memoryBacking>
          <hugepages>
            <page size='2048' unit='KiB' nodeset='0'/>
          </hugepages>
        </memoryBacking>
      
      didn't trigger the '-mem-path' so the huge pages - despite being
      configured - were not used at all.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      281f7001
    • M
      conf: Disallow nonexistent NUMA nodes for hugepages · ec982f6d
      Michal Privoznik 提交于
      As of 136ad497 it is possible to specify different huge pages per
      guest NUMA node. However, there's no check if nodeset specified in
      ./hugepages/page contains only those guest NUMA nodes that exist.
      In other words with current code it is possible to define meaningless
      combination:
      
        <memoryBacking>
          <hugepages>
            <page size='1048576' unit='KiB' nodeset='0,2-3'/>
            <page size='2048' unit='KiB' nodeset='1,4'/>
          </hugepages>
        </memoryBacking>
        <vcpu placement='static'>4</vcpu>
        <cpu>
          <numa>
            <cell id='0' cpus='0' memory='1048576'/>
            <cell id='1' cpus='1' memory='1048576'/>
            <cell id='2' cpus='2' memory='1048576'/>
            <cell id='3' cpus='3' memory='1048576'/>
          </numa>
        </cpu>
      
      Notice the node 4 in <hugepages/>?
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      ec982f6d
  28. 17 9月, 2014 1 次提交