1. 09 1月, 2016 4 次提交
  2. 08 1月, 2016 2 次提交
  3. 07 1月, 2016 3 次提交
  4. 05 1月, 2016 3 次提交
    • M
      qemu: Specify format= iff disk source is not empty · d7db33bf
      Michal Privoznik 提交于
      Just recently, qemu forbade specifying format for sourceless
      disks (qemu commit 39c4ae941ed992a3bb5). It kind of makes sense.
      If there's no file to open, why specify its format. Anyway, I
      have a domain like this:
      
          <disk type='file' device='cdrom'>
            <driver name='qemu' type='raw'/>
            <target dev='hda' bus='ide'/>
            <readonly/>
            <address type='drive' controller='0' bus='0' target='0' unit='0'/>
          </disk>
      
      and obviously I am unable to start it. Therefore, a fix on our
      side is needed too.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      d7db33bf
    • D
      Use tristate constants for new 'append' field · 8746d95f
      Dmitry Mishin 提交于
      For completeness, use the VIR_TRISTATE_SWITCH_ABSENT for data.file.append
      comparisons. Commit ids '70ffa02f' and '53a15aed' just went with the non
      zero comparison.
      8746d95f
    • M
      qemu: Fix return value of qemuDomainGetBlockJobInfo · 783b2544
      Michal Privoznik 提交于
      While reviewing 1b43885d I've noticed a virReportError()
      followed by a goto endjob; without setting the correct return
      value. Problem is, if block job is so fast that it's bandwidth
      does not fit into ulong, an error is reported. However, by that
      time @ret is already set to 1 which means success. Since the
      scenario can be hardly considered successful, we should return a
      value meaning error.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      783b2544
  5. 04 1月, 2016 2 次提交
    • M
      qemu: do not leak NBD disk data in migration cookie · 28c9eea0
      Michael Chapman 提交于
      Valgrind complained:
      
      ==18990== 20 (16 direct, 4 indirect) bytes in 1 blocks are definitely lost in loss record 188 of 996
      ==18990==    at 0x4A057BB: calloc (vg_replace_malloc.c:593)
      ==18990==    by 0x5292E9B: virAllocN (viralloc.c:191)
      ==18990==    by 0x2221E731: qemuMigrationCookieXMLParseStr (qemu_migration.c:1012)
      ==18990==    by 0x2221F390: qemuMigrationEatCookie (qemu_migration.c:1413)
      ==18990==    by 0x222228CE: qemuMigrationPrepareAny (qemu_migration.c:3463)
      ==18990==    by 0x22224121: qemuMigrationPrepareDirect (qemu_migration.c:3865)
      ==18990==    by 0x22251C25: qemuDomainMigratePrepare3Params (qemu_driver.c:12414)
      ==18990==    by 0x5389EE0: virDomainMigratePrepare3Params (libvirt-domain.c:5107)
      ==18990==    by 0x1278DB: remoteDispatchDomainMigratePrepare3ParamsHelper (remote.c:5425)
      ==18990==    by 0x53FF287: virNetServerProgramDispatch (virnetserverprogram.c:437)
      ==18990==    by 0x540523D: virNetServerProcessMsg (virnetserver.c:135)
      ==18990==    by 0x54052C7: virNetServerHandleJob (virnetserver.c:156)
      ==18990==
      ==18990== 20 (16 direct, 4 indirect) bytes in 1 blocks are definitely lost in loss record 189 of 996
      ==18990==    at 0x4A057BB: calloc (vg_replace_malloc.c:593)
      ==18990==    by 0x5292E9B: virAllocN (viralloc.c:191)
      ==18990==    by 0x2221E731: qemuMigrationCookieXMLParseStr (qemu_migration.c:1012)
      ==18990==    by 0x2221F390: qemuMigrationEatCookie (qemu_migration.c:1413)
      ==18990==    by 0x222249D2: qemuMigrationRun (qemu_migration.c:4395)
      ==18990==    by 0x22226365: doNativeMigrate (qemu_migration.c:4693)
      ==18990==    by 0x22228E45: qemuMigrationPerform (qemu_migration.c:5553)
      ==18990==    by 0x2225144B: qemuDomainMigratePerform3Params (qemu_driver.c:12621)
      ==18990==    by 0x539F5D8: virDomainMigratePerform3Params (libvirt-domain.c:5206)
      ==18990==    by 0x127305: remoteDispatchDomainMigratePerform3ParamsHelper (remote.c:5557)
      ==18990==    by 0x53FF287: virNetServerProgramDispatch (virnetserverprogram.c:437)
      ==18990==    by 0x540523D: virNetServerProcessMsg (virnetserver.c:135)
      
      If we're replacing the NBD data, it's simplest to free the old object
      (including the disk list) and allocate a new one.
      Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
      28c9eea0
    • M
      qemu: do not copy out non-existent block job info · 1b43885d
      Michael Chapman 提交于
      Valgrind complained:
      
      ==23975== Conditional jump or move depends on uninitialised value(s)
      ==23975==    at 0x22255FA6: qemuDomainGetBlockJobInfo (qemu_driver.c:16538)
      ==23975==    by 0x538E97C: virDomainGetBlockJobInfo (libvirt-domain.c:9685)
      ==23975==    by 0x12F740: remoteDispatchDomainGetBlockJobInfoHelper (remote.c:2834)
      ==23975==    by 0x53FF287: virNetServerProgramDispatch (virnetserverprogram.c:437)
      ==23975==    by 0x540523D: virNetServerProcessMsg (virnetserver.c:135)
      ==23975==    by 0x54052C7: virNetServerHandleJob (virnetserver.c:156)
      ==23975==    by 0x52F515B: virThreadPoolWorker (virthreadpool.c:145)
      ==23975==    by 0x52F4668: virThreadHelper (virthread.c:206)
      ==23975==    by 0x6E08A50: start_thread (in /lib64/libpthread-2.12.so)
      ==23975==    by 0x82BE93C: clone (in /lib64/libc-2.12.so)
      ==23975==
      ==23975== Conditional jump or move depends on uninitialised value(s)
      ==23975==    at 0x22255FB4: qemuDomainGetBlockJobInfo (qemu_driver.c:16542)
      ==23975==    by 0x538E97C: virDomainGetBlockJobInfo (libvirt-domain.c:9685)
      ==23975==    by 0x12F740: remoteDispatchDomainGetBlockJobInfoHelper (remote.c:2834)
      ==23975==    by 0x53FF287: virNetServerProgramDispatch (virnetserverprogram.c:437)
      ==23975==    by 0x540523D: virNetServerProcessMsg (virnetserver.c:135)
      ==23975==    by 0x54052C7: virNetServerHandleJob (virnetserver.c:156)
      ==23975==    by 0x52F515B: virThreadPoolWorker (virthreadpool.c:145)
      ==23975==    by 0x52F4668: virThreadHelper (virthread.c:206)
      ==23975==    by 0x6E08A50: start_thread (in /lib64/libpthread-2.12.so)
      ==23975==    by 0x82BE93C: clone (in /lib64/libc-2.12.so)
      
      If no matching block job is found, qemuMonitorGetBlockJobInfo returns 0
      and we should not write anything to the caller-supplied
      virDomainBlockJobInfo pointer.
      Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
      1b43885d
  6. 25 12月, 2015 1 次提交
  7. 24 12月, 2015 1 次提交
  8. 21 12月, 2015 1 次提交
    • A
      pci: Introduce virPCIStubDriver enumeration · 6d9cdd2a
      Andrea Bolognani 提交于
      This replaces the virPCIKnownStubs string array that was used
      internally for stub driver validation.
      
      Advantages:
      
        * possible values are well-defined
        * typos in driver names will be detected at compile time
        * avoids having several copies of the same string around
        * no error checking required when setting / getting value
      
      The names used mirror those in the
      virDomainHostdevSubsysPCIBackendType enumeration.
      6d9cdd2a
  9. 17 12月, 2015 8 次提交
  10. 16 12月, 2015 1 次提交
  11. 15 12月, 2015 6 次提交
    • L
      qemu: add bootindex option to hostdev network interface commandline · a8e3247e
      Laine Stump 提交于
      when appropriate, of course. If the config for a domain specifies boot
      order with <boot dev='blah'/> elements, e.g.:
      
           <os>
             ...
             <boot dev='hd'/>
             <boot dev='network'/>
           </os>
      
      Then the first disk device in the config will have ",bootindex=1"
      appended to its qemu commandline -device options, and the first (and
      *only* the first) network interface device will get ",bootindex=2".
      
      However, if the first network interface device is a "hostdev" device
      (an SRIOV Virtual Function (VF) being assigned to the domain with
      vfio), then the bootindex option will *not* be appended. This happens
      because the bootindex=n option corresponding to the order of "<boot
      dev='network'/>" is added to the -device for the first network device
      when network device commandline args are constructed, but if it's a
      hostdev network device, its commandline arg is instead constructed in
      the loop for hostdevs.
      
      This patch fixes that omission by noticing (in bootHostdevNet) if the
      first network device was a hostdev, and if so passing on the proper
      bootindex to the commandline generator for hostdev devices - the
      result is that ",bootindex=2" will be properly appended to the first
      "network" device in the config even if it is really a hostdev
      (including if it is assigned from a libvirt network pool). (note that
      this is only the case if there is no <bootmenu enabled='yes'/> element
      in the config ("-boot menu-on" in qemu) , since the two are mutually
      exclusive - when the bootmenu is enabled, the individual per-device
      bootindex options can't be used by qemu, and we revert to using "-boot
      order=xyz" instead).
      
      If a greater level of control over boot order is desired (e.g., more
      than one network device should be tried, or a network device other
      than the first one encountered in the config), then <boot
      dev='network'/> in the <os> element should not be used; instead, the
      individual device elements in the config should be given a "<boot
      order='n'/>
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1278421
      a8e3247e
    • P
      qemuMonitorJSONEjectMedia: don't stringify the replay at all · cbd3d065
      Pavel Hrdina 提交于
      Commit 256496e1 introduced a detection if "is locked" in error replay
      from qemu monitor. Commit c4073657 fixed a memory leak, but it was
      pointed out by Peter, that this could be done cleaner without
      stringifing the replay.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      cbd3d065
    • M
      qemuMonitorJSONEjectMedia: Don't leak stringified reply · c4073657
      Michal Privoznik 提交于
      The return value of virJSONValueToString() should be freed when
      no longer needed. This is not the case after 256496e1.
      
      ==26902== 138 bytes in 2 blocks are definitely lost in loss record 1,051 of 1,239
      ==26902==    at 0x4C29F80: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==26902==    by 0xAA5F599: strdup (in /lib64/libc-2.21.so)
      ==26902==    by 0x552BAD9: virStrdup (virstring.c:726)
      ==26902==    by 0x54F60A7: virJSONValueToString (virjson.c:1790)
      ==26902==    by 0x1DF6EBB9: qemuMonitorJSONEjectMedia (qemu_monitor_json.c:2225)
      ==26902==    by 0x1DF57A4C: qemuMonitorEjectMedia (qemu_monitor.c:1985)
      ==26902==    by 0x1DF1EF2D: qemuDomainChangeEjectableMedia (qemu_hotplug.c:199)
      ==26902==    by 0x1DF90314: qemuDomainChangeDiskLive (qemu_driver.c:7985)
      ==26902==    by 0x1DF90476: qemuDomainUpdateDeviceLive (qemu_driver.c:8030)
      ==26902==    by 0x1DF91ED7: qemuDomainUpdateDeviceFlags (qemu_driver.c:8677)
      ==26902==    by 0x561785F: virDomainUpdateDeviceFlags (libvirt-domain.c:8559)
      ==26902==    by 0x134210: remoteDispatchDomainUpdateDeviceFlags (remote_dispatch.h:10966)
      
      ==26902== 106 bytes in 1 blocks are definitely lost in loss record 1,033 of 1,239
      ==26902==    at 0x4C29F80: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==26902==    by 0xAA5F599: strdup (in /lib64/libc-2.21.so)
      ==26902==    by 0x552BAD9: virStrdup (virstring.c:726)
      ==26902==    by 0x54F60A7: virJSONValueToString (virjson.c:1790)
      ==26902==    by 0x1DF6EC0C: qemuMonitorJSONEjectMedia (qemu_monitor_json.c:2227)
      ==26902==    by 0x1DF57A4C: qemuMonitorEjectMedia (qemu_monitor.c:1985)
      ==26902==    by 0x1DF1EF2D: qemuDomainChangeEjectableMedia (qemu_hotplug.c:199)
      ==26902==    by 0x1DF90314: qemuDomainChangeDiskLive (qemu_driver.c:7985)
      ==26902==    by 0x1DF90476: qemuDomainUpdateDeviceLive (qemu_driver.c:8030)
      ==26902==    by 0x1DF91ED7: qemuDomainUpdateDeviceFlags (qemu_driver.c:8677)
      ==26902==    by 0x561785F: virDomainUpdateDeviceFlags (libvirt-domain.c:8559)
      ==26902==    by 0x134210: remoteDispatchDomainUpdateDeviceFlags (remote_dispatch.h:10966)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      c4073657
    • H
      qemu cgroups: move new threads to new cgroup after cpuset is set up · 90b721e4
      Henning Schild 提交于
      Moving tasks to cgroups implied sched_setaffinity. Changing the cpus in
      a set implies the same for all tasks in the group.
      The old code put the the thread into the cpuset inherited from the
      machine cgroup, which allowed it to run outside of vcpupin for a short
      while.
      Signed-off-by: NHenning Schild <henning.schild@siemens.com>
      90b721e4
    • H
      qemu: do not put a task into machine cgroup · a41c00b4
      Henning Schild 提交于
      The machine cgroup is a superset, a parent to the emulator and vcpuX
      cgroups. The parent cgroup should never have any tasks directly in it.
      In fact the parent cpuset might contain way more cpus than the sum of
      emulatorpin and vcpupins. So putting tasks in the superset will allow
      them to run outside of <cputune>.
      Signed-off-by: NHenning Schild <henning.schild@siemens.com>
      a41c00b4
    • H
      util: cgroups do not implicitly add task to new machine cgroup · 71ce4759
      Henning Schild 提交于
      virCgroupNewMachine used to add the pidleader to the newly created
      machine cgroup. Do not do this implicit anymore.
      Signed-off-by: NHenning Schild <henning.schild@siemens.com>
      71ce4759
  12. 14 12月, 2015 1 次提交
  13. 11 12月, 2015 3 次提交
  14. 09 12月, 2015 4 次提交