1. 16 3月, 2015 13 次提交
    • 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
    • J
      Convert virDomainPinDefPtr->vcpuid to virDomainPinDefPtr->id · a9f528ab
      John Ferlan 提交于
      Since we're not specifically a vcpu related structure anymore...
      a9f528ab
    • J
      Convert virDomainVcpuPinDefPtr to virDomainPinDefPtr · 59ba7023
      John Ferlan 提交于
      As pointed out by jtomko in his review of the IOThreads pinning code:
      
      http://www.redhat.com/archives/libvir-list/2015-March/msg00495.html
      
      there are some comments sprinkled in indicating IOThreads were using
      the same structure as the VcpuPin code...
      
      This is the first patch of a few that will change the virDomainVcpuPin*
      structures and code to just virDomainPin* - starting with the data
      structure naming...
      59ba7023
    • J
      qemu: Fix possible memory leak in qemuDomainPinVcpuFlags · ffa9f8a1
      John Ferlan 提交于
      During his review of the iothreads pin setting code, Pavel noted that
      there was a potential memory leak with respect to how the newVcpuPin
      is handled and the goto endjob's in failure paths which would not free
      the memory.  For reference, See:
      
      http://www.redhat.com/archives/libvir-list/2015-March/msg00415.html
      ffa9f8a1
    • P
      conf: Make specifying <memory> optional · 4bca6192
      Peter Krempa 提交于
      Now that the size of guest's memory can be inferred from the NUMA
      configuration (if present) make it optional to specify <memory>
      explicitly.
      
      To make sure that memory is specified add a check that some form of
      memory size was specified. One side effect of this change is that it is
      no longer possible to specify 0KiB as memory size for the VM, but I
      don't think it would be any useful to do so. (I can imagine embedded
      systems without memory, just registers, but that's far from what libvirt
      is usually doing).
      
      Forbidding 0 memory for guests also fixes a few corner cases where 0 was
      not interpreted correctly and caused failures. (Arguments for numad when
      using automatic placement, size of the balloon). This fixes problems
      described in https://bugzilla.redhat.com/show_bug.cgi?id=1161461
      
      Test case changes are added to verify that the schema change and code
      behave correctly.
      4bca6192
    • P
      conf: Automatically use NUMA memory size in case NUMA is enabled · caf88a3c
      Peter Krempa 提交于
      Use the NUMA total instead of the configured size both in XML and for
      uses in the code once NUMA is enabled for a domain.
      
      One test case change is necessary as the rounding of the individual cell
      sizes was not matching the rounding of the total size.
      caf88a3c
    • P
      qemu: command: Add helper to align memory sizes · 57b215ab
      Peter Krempa 提交于
      The memory sizes in qemu are aligned up to 1 MiB boundaries. There are
      two places where this was done once for the total size and then for
      individual NUMA cell sizes.
      
      Add a function that will align the sizes in one place so that it's clear
      where the sizes are aligned.
      57b215ab
    • 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
    • P
      qemu: Disallow concurrent block jobs on a single disk · 51f9f03a
      Peter Krempa 提交于
      While qemu may be prepared to do this libvirt is not. Forbid the block
      ops until we fix our code.
      51f9f03a
    • P
      qemu: event: Don't fiddle with disk backing trees without a job · 1a92c719
      Peter Krempa 提交于
      Surprisingly we did not grab a VM job when a block job finished and we'd
      happily rewrite the backing chain data. This made it possible to crash
      libvirt when queueing two backing chains tightly and other badness.
      
      To fix it, add yet another handler to the helper thread that handles
      monitor events that require a job.
      1a92c719
    • P
      5c634730
    • E
      qemu: Check for negative port values in network drive configuration · 84646165
      Erik Skultety 提交于
      We interpret port values as signed int (convert them from char *),
      so if a negative value is provided in network disk's configuration,
      we accept it as valid, however there's an 'unknown cause' error raised later.
      This error is only accidental because we return the port value in the return code.
      This patch adds just a minor tweak to the already existing check so we
      reject negative values the same way as we reject non-numerical strings.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1163553
      84646165
    • E
      AUTHORS: add myself to commiters list · 043c660e
      Erik Skultety 提交于
      043c660e
  2. 15 3月, 2015 3 次提交
    • E
      network: avoid memory leak of dnsmasq capabilities · eea08abe
      Eric Blake 提交于
      Valgrind detected a leak:
      
      ==17820== 102 (56 direct, 46 indirect) bytes in 1 blocks are definitely lost in loss record 479 of 646
      ==17820==    at 0x4A08946: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==17820==    by 0x508521A: virAllocVar (viralloc.c:560)
      ==17820==    by 0x50D9FCA: virObjectNew (virobject.c:193)
      ==17820==    by 0x50A4FD9: dnsmasqCapsNewEmpty (virdnsmasq.c:784)
      ==17820==    by 0x50A514E: dnsmasqCapsNewFromBinary (virdnsmasq.c:830)
      ==17820==    by 0x1B508287: networkStateInitialize (bridge_driver.c:666)
      
      It looks like commit 172acef4 introduced the problem, because
      networkGetDnsmasqCaps() increments the reference count but an
      early exit never does a matching decrement.
      
      * src/network/bridge_driver.c (networkStateCleanup): Plug leak.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      eea08abe
    • E
      netdev: silence valgrind warning about ioctl use · a9abc08d
      Eric Blake 提交于
      Valgrind complained:
      
      ==3770== Syscall param ioctl(SIOCETHTOOL) points to uninitialised byte(s)
      ==3770==    at 0x919D407: ioctl (syscall-template.S:81)
      ==3770==    by 0x530FE7E: rpl_ioctl (ioctl.c:42)
      ==3770==    by 0x50CB433: virNetDevFeatureAvailable (virnetdev.c:2764)
      ==3770==    by 0x50CB6A7: virNetDevGetFeatures (virnetdev.c:2830)
      ==3770==    by 0x1F0E5347: udevProcessNetworkInterface (node_device_udev.c:722)
      ==3770==    by 0x1F0E689F: udevGetDeviceDetails (node_device_udev.c:1300)
      ==3770==    by 0x1F0E6E06: udevAddOneDevice (node_device_udev.c:1422)
      ==3770==    by 0x1F0E6FB8: udevProcessDeviceListEntry (node_device_udev.c:1464)
      ==3770==    by 0x1F0E70CF: udevEnumerateDevices (node_device_udev.c:1494)
      ==3770==    by 0x1F0E7BB4: nodeStateInitialize (node_device_udev.c:1806)
      ==3770==    by 0x51B4303: virStateInitialize (libvirt.c:777)
      ==3770==    by 0x11DEE7: daemonRunStateInit (libvirtd.c:906)
      ==3770==  Address 0x228e38d4 is on thread 12's stack
      ==3770==  in frame #2, created by virNetDevFeatureAvailable (virnetdev.c:2750)
      
      * src/util/virnetdev.c (virNetDevFeatureAvailable): Initialize all
      bytes of ifr.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      a9abc08d
    • E
      virsh: fix report of non-active commit completion · ceec58ac
      Eric Blake 提交于
      Commit f182da20 (v1.2.6) caused a slight regression in virsh
      reporting of a non-active block job; where it used to state
      "Commit complete", it now states "Now in synchronized phase".
      But the synchronized phase is only possible for an active commit.
      
      For a reproducer, I created a chain 'a <- b <- c <- d <- e' and
      ran virsh blockcommit $dom vda --top c --base a --verbose --wait
      
      * tools/virsh-domain.c (cmdBlockCommit): Synchronized phase is
      only possible on active commits.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ceec58ac
  3. 14 3月, 2015 6 次提交
  4. 13 3月, 2015 13 次提交
  5. 12 3月, 2015 5 次提交