1. 15 8月, 2016 4 次提交
    • J
      Introduce node device update event as top level event · 43a6b37b
      Jovanka Gulicoska 提交于
      This event is emitted when a nodedev XML definition is updated,
      like when cdrom media is changed in a cdrom block device.
      
      Also includes node device update event implementation for udev
      backend, virsh nodedev-event support, and event-test support
      43a6b37b
    • J
      virsh: Fix core for cmdSecretGetValue · 18701e9d
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1366611
      
      When commit id 'cb2e3e50' reworked the cmdSecretGetValue call to use
      VIR_DISPOSE_STRING for base64, it neglected to initialize the base64
      value to NULL since the cleanup: label could be reached prior to the
      base64 value being set or not.  This resulted in a core dump, adding
      the initialization will avoid the issue.
      18701e9d
    • P
      qemu_command: don't modify heads for graphics device · ef11e770
      Pavel Hrdina 提交于
      Setting heads to 0 in case that *max_outputs* is not supported while building
      command line doesn't have any real effect.  It only removes *heads* attribute
      from live XML, but after restarting libvirt the default value is restored.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      ef11e770
    • M
      virschematest: Make sure that validator is initialized · cba18f8a
      Michal Privoznik 提交于
      It may happen that a developer wants to run just a specific
      subset of tests:
      
      tests $ VIR_TEST_RANGE=22 ../run ./virschematest
      
      This now fails miserably:
      
          ==6840== Invalid read of size 8
          ==6840==    at 0x4F397C0: virXMLValidatorValidate (virxml.c:1216)
          ==6840==    by 0x402B72: testSchemaFile (virschematest.c:53)
          ==6840==    by 0x403737: virTestRun (testutils.c:180)
          ==6840==    by 0x402CF5: testSchemaDir (virschematest.c:98)
          ==6840==    by 0x402EB1: testSchemaDirs (virschematest.c:131)
          ==6840==    by 0x40314D: mymain (virschematest.c:194)
          ==6840==    by 0x4051AF: virTestMain (testutils.c:982)
          ==6840==    by 0x4035A9: main (virschematest.c:217)
          ==6840==  Address 0x10 is not stack'd, malloc'd or (recently) free'd
      
      Problem is, we are trying to do two types of tests here: validate
      RNG schema itself, and validate XML files against RNG schemas.
      And the latter tries to re-use a resource allocated in the
      former. Therefore if the former is skipped (due to
      VIR_TEST_RANGE) we have to allocate the resource manually.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      cba18f8a
  2. 13 8月, 2016 1 次提交
    • J
      cpu_x86: fix libvirtd crash when host cpu vendor is not available · 541e9ae6
      Jim Fehlig 提交于
      When starting a guest and copying host vendor cpuid to the guest
      cpu, libvirtd would crash if the host cpu contained a NULL vendor
      field. Avoid the crash by checking for a valid vendor in the host
      cpu before copying the cpuid to the guest cpu.
      
      For completeness, here is a backtrace from the crash
      
      (gdb) bt
      f0  0x00007ffff739bf33 in x86DataCpuid (cpuid=0x8, cpuid=0x8,
          data=data@entry=0x7fffb800ee78) at cpu/cpu_x86.c:287
      f1  virCPUx86DataAddCPUID (data=data@entry=0x7fffb800ee78, cpuid=0x8)
          at cpu/cpu_x86.c:355
      f2  0x00007ffff739ef47 in x86Compute (host=<optimized out>, cpu=0x7fffb8000cc0,
          guest=0x7fffecca7348, message=<optimized out>) at cpu/cpu_x86.c:1580
      f3  0x00007fffd2b38e53 in qemuBuildCpuModelArgStr (migrating=false,
          hasHwVirt=<synthetic pointer>, qemuCaps=0x7fffb8001040, buf=0x7fffecca7360,
          def=0x7fffc400ce20, driver=0x1c) at qemu/qemu_command.c:6283
      f4  qemuBuildCpuCommandLine (cmd=cmd@entry=0x7fffb8002f60,
          driver=driver@entry=0x7fffc80882c0, def=def@entry=0x7fffc400ce20,
          qemuCaps=qemuCaps@entry=0x7fffb8001040, migrating=<optimized out>)
          at qemu/qemu_command.c:6445
      (gdb) f2
      (gdb) p *host_model
      $23 = {name = 0x7fffb800ec50 "qemu64", vendor = 0x0, signature = 0, data = {
          len = 2, data = 0x7fffb800e720}}
      541e9ae6
  3. 12 8月, 2016 5 次提交
    • A
      qemu: command: Simplify USB controller model selection · f257a4ad
      Andrea Bolognani 提交于
      Since we now pick the default USB controller model when parsing
      the guest XML, we can get rid of some duplicated code so that
      the default model selection happens in one place only.
      
      Add some comments as well.
      f257a4ad
    • A
      qemu: domain: Drop piix3-ohci controller for migration · 31de0fab
      Andrea Bolognani 提交于
      Now that the default USB controller model is explicit rather
      than implicit for i440fx machines, we have to tweak the
      conditions for dropping it in order to keep migration towards
      libvirt <= 0.9.4 working.
      31de0fab
    • A
      qemu: domain: Reflect USB controller model in guest XML · f55eaccb
      Andrea Bolognani 提交于
      When the user doesn't specify any model for a USB controller,
      we use an architecture-dependent default, but we don't reflect
      it in the guest XML.
      
      Pick the default USB controller model when parsing the guest
      XML instead of when creating the QEMU command line, so that
      our choice is saved back to disk.
      f55eaccb
    • M
      virschematest: Initialize @data · f87cc927
      Michal Privoznik 提交于
      ==8630== Invalid read of size 8
      ==8630==    at 0x4EA4F0F: virFree (viralloc.c:582)
      ==8630==    by 0x4F398F0: virXMLValidatorFree (virxml.c:1257)
      ==8630==    by 0x40305C: mymain (virschematest.c:191)
      ==8630==    by 0x405159: virTestMain (testutils.c:982)
      ==8630==    by 0x403553: main (virschematest.c:215)
      ==8630==  Address 0xcd72243 is 131 bytes inside a block of size 177 free'd
      ==8630==    at 0x4C2B1F0: free (vg_replace_malloc.c:473)
      ==8630==    by 0x4EA4F19: virFree (viralloc.c:582)
      ==8630==    by 0x4ED0973: virFindFileInPath (virfile.c:1646)
      ==8630==    by 0x405149: virTestMain (testutils.c:980)
      ==8630==    by 0x403553: main (virschematest.c:215)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      f87cc927
    • M
      schema: Don't validate paths · c4b92f1a
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1353296
      
      On UNIX like systems there are no constraints on what characters
      can be in file/dir names (except for NULL, obviously). Moreover,
      some values that we think of as paths (e.g. disk source) are not
      necessarily paths at all. For instance, some hypervisors take
      that as an arbitrary identifier and corresponding file is then
      looked up by hypervisor in its table. Instead of trying to fix
      our regular expressions (and forgetting to include yet another
      character there), lets drop the validation completely.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      c4b92f1a
  4. 10 8月, 2016 14 次提交
  5. 09 8月, 2016 3 次提交
  6. 08 8月, 2016 3 次提交
    • M
      docs: Distribute subsite.xsl · e396de03
      Michal Privoznik 提交于
      So, I've ran into very interesting problem lately. When doing the
      following, I've encountered an error:
      
        libvirt.git $ make dist && tar -xJf libvirt-2.2.0.tar.xz && \
                      cd libvirt-2.2.0 && ./configure && \
                      rm docs/formatdomain.html && make -C docs
      
        make: Entering directory 'docs'
        make: *** No rule to make target 'formatdomain.html', needed by 'web'.  Stop.
        make: Leaving directory 'docs'
      
      I had no idea what was going on, so I've nailed down the commit
      that "broke it" via running git-bisect. It was this one:
      7659bd92. But that shed no more light until I realized
      that the commit might actually just exposed a problem we had. And
      guess what - I've nailed it down. Of course we are not
      distributing subsite.xsl that's why make prints error message.
      Very misleading one I must say.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      e396de03
    • M
      virsystemd: Fix error check · cdf06553
      Marc Hartmayer 提交于
      Commit b3e4401d introduced a check to ignore an error if the guest
      is already terminated. However the check accidentally compared
      error.code with VIR_ERR_ERROR, which is an error level, not an error
      code. Because of this, almost every error got silently ignored.
      
      Fixes: b3e4401d ("systemd: don't report an error if the guest is
      already terminated")
      Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
      Reviewed-by: NSascha Silbe <silbe@linux.vnet.ibm.com>
      Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
      cdf06553
    • K
      nsslinktest: also build virAtomic.h · 7e1ca80d
      Kai Kang 提交于
      When build for architecture that don't use gcc atomic ops but pthread,
      it fails to build for armel:
      
      | ../tools/nss/.libs/libnss_libvirt_impl.a(libvirt_nss_la-virobject.o): In function `virClassNew':
      | /buildarea2/kkang/builds/qemuarm-Aug03/bitbake_build/tmp/work/armv5e-wrs-linux-gnueabi/libvirt/1.3.5-r0/build/src/../../libvirt-1.3.5/src/util/virobject.c:153: undefined reference to `virAtomicLock'
      | ../tools/nss/.libs/libnss_libvirt_impl.a(libvirt_nss_la-virobject.o): In function `virObjectNew':
      | /buildarea2/kkang/builds/qemuarm-Aug03/bitbake_build/tmp/work/armv5e-wrs-linux-gnueabi/libvirt/1.3.5-r0/build/src/../../libvirt-1.3.5/src/util/virobject.c:205: undefined reference to `virAtomicLock'
      | ../tools/nss/.libs/libnss_libvirt_impl.a(libvirt_nss_la-virobject.o): In function `virObjectUnref':
      | /buildarea2/kkang/builds/qemuarm-Aug03/bitbake_build/tmp/work/armv5e-wrs-linux-gnueabi/libvirt/1.3.5-r0/build/src/../../libvirt-1.3.5/src/util/virobject.c:277: undefined reference to `virAtomicLock'
      | ../tools/nss/.libs/libnss_libvirt_impl.a(libvirt_nss_la-virobject.o): In function `virObjectRef':
      | /buildarea2/kkang/builds/qemuarm-Aug03/bitbake_build/tmp/work/armv5e-wrs-linux-gnueabi/libvirt/1.3.5-r0/build/src/../../libvirt-1.3.5/src/util/virobject.c:298: undefined reference to `virAtomicLock'
      | collect2: error: ld returned 1 exit status
      
      It is similar with:
      
      http://libvirt.org/git/?p=libvirt.git;a=commit;h=12dc729Signed-off-by: NKai Kang <kai.kang@windriver.com>
      7e1ca80d
  7. 07 8月, 2016 2 次提交
  8. 06 8月, 2016 2 次提交
    • E
      build: centralize use of extra Cygwin LDFLAGS · f33f03d0
      Eric Blake 提交于
      The build was failing with:
      
        CCLD     lockd.la
      libtool:   error: can't build i686-pc-cygwin shared library unless -no-undefined is specified
      
      Rather than add yet another $(CYGWIN_EXTRA_LDFLAGS) to all the
      impacted *_la_LDFLAGS, it was easier to just pull the extra
      flags into ALL libraries via AM_LDFLAGS.
      
      Then, fix lockd_la_LDFLAGS to include AM_LDFLAGS, like all other
      libraries.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      f33f03d0
    • E
      build: use XDR_CFLAGS for Cygwin build · aa760cd5
      Eric Blake 提交于
      Without XDR_CFLAGS, compilation on Cygwin fails with:
      
        CC       libvirt_driver_la-libvirt-stream.lo
      In file included from libvirt-stream.c:26:0:
      rpc/virnetprotocol.h:9:21: fatal error: rpc/rpc.h: No such file or directory
      Signed-off-by: NEric Blake <eblake@redhat.com>
      aa760cd5
  9. 05 8月, 2016 6 次提交