1. 16 3月, 2015 4 次提交
    • J
      Convert virDomainVcpuPinDefCopy into virDomainPinDefCopy · c16723f6
      John Ferlan 提交于
      Since both Vcpu and IOThreads code use the same API's, alter the naming
      of the API's to remove the "Vcpu" specific reference
      c16723f6
    • J
      Convert virDomainVcpuPinDefArrayFree to virDomainPinDefArrayFree · 24b15ea9
      John Ferlan 提交于
      Since both Vcpu and IOThreads code use the same API's, alter the naming
      of the API's to remove the "Vcpu" specific reference
      24b15ea9
    • J
      Convert virDomainVcpuPinDefFree to virDomainPinDefFree · 0a06a181
      John Ferlan 提交于
      Since both Vcpu and IOThreads code use the same API's, alter the naming
      of the API's to remove the "Vcpu" specific reference
      0a06a181
    • P
      conf: Replace access to def->mem.max_balloon with accessor functions · 4f9907cd
      Peter Krempa 提交于
      As there are two possible approaches to define a domain's memory size -
      one used with legacy, non-NUMA VMs configured in the <memory> element
      and per-node based approach on NUMA machines - the user needs to make
      sure that both are specified correctly in the NUMA case.
      
      To avoid this burden on the user I'd like to replace the NUMA case with
      automatic totaling of the memory size. To achieve this I need to replace
      direct access to the virDomainMemtune's 'max_balloon' field with
      two separate getters depending on the desired size.
      
      The two sizes are needed as:
      1) Startup memory size doesn't include memory modules in some
      hypervisors.
      2) After startup these count as the usable memory size.
      
      Note that the comments for the functions are future aware and document
      state that will be present after a few later patches.
      4f9907cd
  2. 14 3月, 2015 1 次提交
  3. 13 3月, 2015 1 次提交
    • J
      Introduce virBitmapIsBitSet · 22fd3ac3
      Ján Tomko 提交于
      A helper that never returns an error and treats bits out of bitmap range
      as false.
      
      Use it everywhere we use ignore_value on virBitmapGetBit, or loop over
      the bitmap size.
      22fd3ac3
  4. 12 3月, 2015 1 次提交
  5. 11 3月, 2015 3 次提交
  6. 09 3月, 2015 5 次提交
  7. 06 3月, 2015 3 次提交
  8. 05 3月, 2015 1 次提交
    • J
      SRIOV NIC offload feature discovery · c9027d8f
      James Chapman 提交于
      Adding functionality to libvirt that will allow it
      query the ethtool interface for the availability
      of certain NIC HW offload features
      
      Here is an example of the feature XML definition:
      
      <device>
      <name>net_eth4_90_e2_ba_5e_a5_45</name>
        <path>/sys/devices/pci0000:00/0000:00:03.0/0000:08:00.1/net/eth4</path>
        <parent>pci_0000_08_00_1</parent>
        <capability type='net'>
          <interface>eth4</interface>
          <address>90:e2:ba:5e:a5:45</address>
          <link speed='10000' state='up'/>
          <feature name='rx'/>
          <feature name='tx'/>
          <feature name='sg'/>
          <feature name='tso'/>
          <feature name='gso'/>
          <feature name='gro'/>
          <feature name='rxvlan'/>
          <feature name='txvlan'/>
          <feature name='rxhash'/>
          <capability type='80203'/>
        </capability>
      </device>
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      c9027d8f
  9. 04 3月, 2015 2 次提交
  10. 03 3月, 2015 2 次提交
    • M
      conf: De-duplicate scheduling policy enums · 2fd5880b
      Martin Kletzander 提交于
      Since adding the support for scheduler policy settings in commit
      8680ea97, there are two enums with the same information.  That was
      caused by rewriting the patch since first draft.
      
      Find out thanks to clang, but there was no impact whatsoever.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      2fd5880b
    • J
      disk: Disallow duplicated target 'dev' values · e0e29055
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1142631
      
      This patch resolves a situation where the same "<target dev='$name'...>"
      can be used for multiple disks in the domain.
      
      While the $name is "mostly" advisory regarding the expected order that
      the disk is added to the domain and not guaranteed to map to the device
      name in the guest OS, it still should be unique enough such that other
      domblk* type operations can be performed.
      
      Without the patch, the domblklist will list the same Target twice:
      
      $ virsh domblklist $dom
      Target     Source
      ------------------------------------------------
      sda        /var/lib/libvirt/images/file.qcow2
      sda        /var/lib/libvirt/images/file.img
      
      Additionally, getting domblkstat, domblkerror, domblkinfo, and other block*
      type calls will not be able to reference the second target.
      
      Fortunately, hotplug disallows adding a "third" sda value:
      
      $ qemu-img create -f raw /var/lib/libvirt/images/file2.img 10M
      $ virsh attach-disk $dom /var/lib/libvirt/images/file2.img sda
      error: Failed to attach disk
      error: operation failed: target sda already exists
      
      $
      
      BUT, it since 'sdb' doesn't exist one would get the following on the same
      hotplug attempt, but changing to use 'sdb' instead of 'sda'
      
      $ virsh attach-disk $dom /var/lib/libvirt/images/file2.img sdb
      error: Failed to attach disk
      error: internal error: unable to execute QEMU command 'device_add': Duplicate ID 'scsi0-0-1' for device
      
      $
      
      Since we cannot fix this issue at parsing time, the best that can be done so
      as to not "lose" a domain is to make the check prior to starting the guest
      with the results as follows:
      
      $ virsh start $dom
      error: Failed to start domain $dom
      error: XML error: target 'sda' duplicated for disk sources '/var/lib/libvirt/images/file.qcow2' and '/var/lib/libvirt/images/file.img'
      
      $
      
      Running 'make check' found a few more instances in the tests where this
      duplicated target dev value was being used. These also exhibited some
      duplicated 'id=' values (negating the uniqueness argument of aliases) in
      the corresponding .args file and of course the *xmlout version of a few
      input XML files.
      e0e29055
  11. 02 3月, 2015 1 次提交
  12. 25 2月, 2015 1 次提交
    • M
      util: Introduce virBufferAddBuffer · 83c5467e
      Michal Privoznik 提交于
      This API joins the following two lines:
      
      char *s = virBufferContentAndReset(buf1);
      virBufferAdd(buf2, s, -1);
      
      into one:
      
      virBufferAddBuffer(buf2, buf1);
      
      With one exception: there's no re-indentation applied to @buf1.
      The idea is, that in general both can have different indentation
      (like the test I'm adding proves)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      83c5467e
  13. 21 2月, 2015 9 次提交
  14. 17 2月, 2015 1 次提交
  15. 13 2月, 2015 2 次提交
  16. 12 2月, 2015 2 次提交
  17. 10 2月, 2015 1 次提交