1. 09 2月, 2015 3 次提交
  2. 07 2月, 2015 1 次提交
    • S
      maint: improve usage of autogen's --no-git · 0c77a54e
      Stefan Zimmermann 提交于
      If you build libvirt with the --no-git option, then gnulib requires
      either $GNULIB_SRCDIR in the environment or --gnulib-srcdir on the
      command line.  But we had not been supporting its use from the
      command line.  This patch is a bit picky: --gnulib-srcdir must be
      passed immediately after --no-git; but since we don't reorder
      arguments, and since we already required --no-git to be first to
      have any effect, it's not too horrible.  It also does the wrong
      thing if you include spaces in your arguments, but developers
      doing that deserve what they get, right?
      Signed-off-by: NStefan Zimmermann <stzi@linux.vnet.ibm.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      0c77a54e
  3. 06 2月, 2015 6 次提交
  4. 05 2月, 2015 3 次提交
    • J
      nodedev: check/add for scsi_host caps for NumOfCaps and ListCaps · f44ec9c1
      John Ferlan 提交于
      Commit id '652a2ec6' introduced two new node device capability flags
      and the ability to use those flags as a way to search for a specific
      subset of a 'scsi_host' device - namely a 'fc_host' and/or 'vports'.
      The code modified the virNodeDeviceCapMatch whichs allows for searching
      using the 'virsh nodedev-list [cap]' via virConnectListAllNodeDevices.
      
      However, the original patches did not account for other searches for
      the same capability key from virNodeDeviceNumOfCaps and virNodeDeviceListCaps
      using nodeDeviceNumOfCaps and nodeDeviceListCaps. Since 'fc_host' and
      'vports' are self defined bits of a 'scsi_host' device mere string
      comparison against the basic/root type is not sufficient.
      
      This patch adds the check for the 'fc_host' and 'vports' bits within
      a 'scsi_host' device and allows the following python code to find the
      capabilities for the device:
      
      import libvirt
      conn = libvirt.openReadOnly('qemu:///system')
      devs = conn.listAllDevices()
      for dev in devs:
          if 'fc_host' in dev.listCaps() or 'vports' in dev.listCaps():
              print dev.name(),dev.numOfCaps(),dev.listCaps()
      f44ec9c1
    • S
      nodedev: check/add for scsi_host caps for ListDevices · e8fcac8e
      Shivaprasad G Bhat 提交于
      Commit id '652a2ec6' introduced two new node device capability flags
      and the ability to use those flags as a way to search for a specific
      subset of a 'scsi_host' device - namely a 'fc_host' and/or 'vports'.
      The code modified the virNodeDeviceCapMatch whichs allows for searching
      using the 'virsh nodedev-list [cap]' via virConnectListAllNodeDevices.
      
      However, the original patches did not account for other searches for
      the same capability key from virNodeListDevices using virNodeDeviceHasCap.
      Since 'fc_host' and 'vports' are self defined bits of a 'scsi_host'
      device mere string comparison against the basic/root type is not
      sufficient.
      
      This patch adds the check for the 'fc_host' and 'vports' bits within
      a 'scsi_host' device and allows the following python code to find the
      capabilities for the device:
      
      import libvirt
      conn = libvirt.openReadOnly('qemu:///system')
      fc = conn.listDevices('fc_host', 0)
      print(fc)
      fc = conn.listDevices('vports', 0)
      print(fc)
      Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
      e8fcac8e
    • L
      qemu: Properly report error on uuid mismatch in the migration cookie · 1b2c9ce7
      Luyao Huang 提交于
      Add the missing jump to the error label when the uuid in the
      migration cookie XML does not match the uuid of the migrated
      domain.
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      1b2c9ce7
  5. 04 2月, 2015 7 次提交
  6. 03 2月, 2015 4 次提交
    • P
      virutil: fix MinGW build · 47dd6c43
      Pavel Hrdina 提交于
      Commit b38da584 introduced two new functions to get a page size but it
      won't work on Windows. We should take care of this.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      47dd6c43
    • P
      virnetdev: fix some issues found by coverity and mingw builds · 8bda9035
      Pavel Hrdina 提交于
      Commit e562a61a introduced new function to get/set interface state but
      there was misuse of ATTRIBUTE_NONNULL on non-pointer attributes and also
      we need to wrap that functions by #ifdef to not break mingw build.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      8bda9035
    • D
      Make tests independant of system page size · b38da584
      Daniel P. Berrange 提交于
      Some code paths have special logic depending on the page size
      reported by sysconf, which in turn affects the test results.
      We must mock this so tests always have a consistent page size.
      b38da584
    • L
      util: make virNetDev(Get|Set)IFFlags() static · df2cc650
      Laine Stump 提交于
      e562a61a added these two new helper functions and only used them
      within virnetdev.c, but declared them in the .h file. If some
      currently unsupported interface flags need to be accessed in the
      future, it will make more sense to write the appropriate higher level
      function rather than require us to artificially define IFF_* on some
      mythical platform that doesn't have SIOC[SG]IFFLAGS (and therefore
      doesn't have IFF_*) just so we can call virNetDevSetIFFFlags() to
      return an error.
      
      To help someone in not going down the wrong road, this patch makes the
      two helper functions static, hopefully making it less likely that
      someone will want to use them outside of virnetdev.c.
      df2cc650
  7. 31 1月, 2015 14 次提交
  8. 30 1月, 2015 2 次提交
    • M
      xend: Don't crash in virDomainXMLDevID · cd7702d4
      Michal Privoznik 提交于
      The function is called from all {Attach,Update,Detach}Device APIs to
      create config strings that are later passed to the xend to perform the
      desired action. The function is intended to handle all supported
      devices. However, as of 5b05358a we
      are trying to get disk driver of the device without checking if the
      device really is a disk. This leads to an segmentation fault:
      
        #0 0x00007ffff7571815 in virDomainDiskGetDriver () from /usr/lib/libvirt.so.0
        #1 0x00007fffeb9ad471 in ?? () from /usr/lib/libvirt/connection-driver/libvirt_driver_xen.so
        #2 0x00007fffeb9b1062 in xenDaemonAttachDeviceFlags () from /usr/lib/libvirt/connection-driver/libvirt_driver_xen.so
        #3 0x00007fffeb9a8a86 in ?? () from /usr/lib/libvirt/connection-driver/libvirt_driver_xen.so
        #4 0x00007ffff7609266 in virDomainAttachDevice () from /usr/lib/libvirt.so.0
        #5 0x0000555555593c9d in ?? ()
        #6 0x00007ffff76743c9 in virNetServerProgramDispatch () from /usr/lib/libvirt.so.0
        #7 0x00005555555a678d in ?? ()
        #8 0x00007ffff755460e in ?? () from /usr/lib/libvirt.so.0
        #9 0x00007ffff7553b06 in ?? () from /usr/lib/libvirt.so.0
        #10 0x00007ffff4998b50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
        #11 0x00007ffff46e30ed in clone () from /lib/x86_64-linux-gnu/libc.so.6
        #12 0x0000000000000000 in ?? ()
      Reported-by: NXiaolin Su <linxxnil@126.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      cd7702d4
    • 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