1. 24 1月, 2013 2 次提交
    • P
    • V
      S390: Enhance memballoon handling for virtio-s390 · 053e813a
      Viktor Mihajlovski 提交于
      The way in that memory balloon suppression was handled for S390
      is flawed for a number or reasons.
      1. Just preventing the default balloon to be created in the case
         of VIR_ARCH_S390[X] is not sufficient. An explicit memballoon
         element in the guest definition will still be honored, resulting
         both in a -balloon option and the allocation of a PCI bus address,
         neither being supported.
      2. Prohibiting balloon for S390 altogether at a domain_conf level
         is no good solution either as there's work in progress on the QEMU
         side to implement a virtio-balloon device, although in
         conjunction with a new machine type. Suppressing the balloon
         should therefore be done at the QEMU driver level depending
         on the present capabilities.
      
      Therefore we remove the conditional suppression of the default
      balloon in domain_conf.c.
      Further, we are claiming the memballoon device for virtio-s390
      during device address assignment to prevent it from being considered
      as a PCI device.
      Finally, we suppress the generation of the balloon command line option
      if this is a virtio-s390 machine.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      053e813a
  2. 23 1月, 2013 6 次提交
    • P
      conf: Fix usage of virBitmapParse · bf62e995
      Peter Krempa 提交于
      virNetworkObjUpdateParseFile used ',' as the termination character for
      virBitmapParse. This would break if an non-contiguous range would be
      parsed.
      bf62e995
    • D
      Fix nwfilter driver reload/shutdown handling when unprivileged · abbec81b
      Daniel P. Berrange 提交于
      Although the nwfilter driver skips startup when running in a
      session libvirtd, it did not skip reload or shutdown. This
      caused errors to be reported when sending SIGHUP to libvirtd,
      and caused an abort() in libdbus on shutdown due to trying
      to remove a dbus filter that was never added
      abbec81b
    • A
      qemu: Support ram bar size for qxl devices · 55bfd020
      Alon Levy 提交于
      Adds a "ram" attribute globally to the video.model element, that changes
      the resulting qemu command line only if video.type == "qxl".
      
      <video>
        <model type='qxl' ram='65536' vram='65536' heads='1'/>
      </video>
      
      That attribute gets a default value of 64*1024. The schema is unchanged
      for other video element types.
      
      The resulting qemu command line change is the addition of
      
      -global qxl-vga.ram_size=<ram>*1024
      
      or
      
      -global qxl.ram_size=<ram>*1024
      
      For the main and secondary qxl devices respectively.
      
      The default for the qxl ram bar is 64*1024 kilobytes (the same as the
      default qxl vram bar size).
      55bfd020
    • P
      23b9502b
    • P
      conf: Check if number of vCPUs fits in the storage variable · c58e1f4d
      Peter Krempa 提交于
      The count of vCPUs for a domain is extracted as a usingned long variable
      but is stored in a unsigned short. If the actual number was too large,
      a faulty number was stored.
      c58e1f4d
    • J
      conf: Need to initialize variables before VIR_FREE · 8164b0e8
      John Ferlan 提交于
      Resolve a couple of instances where variables were not initialized
      prior to potential VIR_FREE call in cleanup path.
      8164b0e8
  3. 22 1月, 2013 1 次提交
    • J
      selinux: Resolve resource leak using the default disk label · 05cc0351
      John Ferlan 提交于
      Commit id a994ef2d changed the mechanism to store/update the default
      security label from using disk->seclabels[0] to allocating one on the
      fly. That change allocated the label, but never saved it.  This patch
      will save the label. The new virDomainDiskDefAddSecurityLabelDef() is
      a copy of the virDomainDefAddSecurityLabelDef().
      05cc0351
  4. 18 1月, 2013 1 次提交
    • L
      conf: don't fail to parse <boot> when parsing a single device · 877dab6c
      Laine Stump 提交于
      This resolves:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=895294
      
      The symptom was that attempts to modify a network device using
      virDomainUpdateDeviceFlags() would fail if the original device had a
      <boot> element (e.g. "<boot order='1'/>"), even if the updated device
      had the same <boot> element. Instead, the following error would be logged:
      
        cannot modify network device boot index setting
      
      It's true that it's not possible to change boot order (internally
      known as bootIndex) of a live device; qemuDomainChangeNet checks for
      that, but the problem was that the information it was checking was
      incorrect.
      
      Explanation:
      
      When a complete domain is parsed, a global (to the domain) "bootMap"
      is passed down to the parse for each device; the bootMap is used to
      make sure that devices don't have conflicting settings for their boot
      orders.
      
      When a single device is parsed by itself (as in the case of
      virDomainUpdateDeviceFlags), there is no global bootMap that would be
      appropriate to send, so NULL is sent instead. However, although the
      lowest level function that parses just the boot order *does* simply
      skip the sanity check in that case, the next higher level
      "virDomainDeviceInfoParseXML" function refuses to call down to the
      lower "virDomainDeviceBootParseXML" if bootMap is NULL. So, the boot
      order is never set in the "new" device object, and when it is compared
      to the original (which does have a boot order), they don't match.
      
      The fix is to patch virDomainDeviceInfoParseXML to not care about
      bootMap, and just always call virDomainDeviceInfoBootParseXML whenever
      there is a <boot> element. When we are only parsing a single device,
      we don't care whether or not any specified boot order is consistent
      with the rest of the domain; we will always do this check later (in
      the current case, we do it by verifying that the net bootIndex exactly
      matches the old bootIndex).
      877dab6c
  5. 17 1月, 2013 3 次提交
    • G
      Fix typo in variable name · 5c1a8251
      Guido Günther 提交于
      that broke the build like:
      
        CC     libvirt_conf_la-domain_conf.lo
        conf/domain_conf.c: In function 'virDomainVcpuPinAdd':
        conf/domain_conf.c:11920:29: error: 'vpcupin' undeclared (first use in this function)
        conf/domain_conf.c:11920:29: note: each undeclared identifier is reported only once for each function it appears in
        make[3]: *** [libvirt_conf_la-domain_conf.lo] Error 1
      5c1a8251
    • J
      conf: fix leak in virDomainVcpuPinAdd · 65aa3e34
      Ján Tomko 提交于
      Fix the leak of vcpupin on failure to allocate cpumask and the leak of
      cpumask if we fail to expand vcpupin_list.
      65aa3e34
    • J
      conf: fix class_id bitmap leak in virNetworkObj · a69d7a00
      Ján Tomko 提交于
      Commit '07d1b6b5' added class_id bitmap to virNetworkObj but never freed
      it.
      a69d7a00
  6. 16 1月, 2013 2 次提交
  7. 10 1月, 2013 2 次提交
    • G
      network: fix typos and docs · 29d37818
      Guannan Ren 提交于
      29d37818
    • G
      qemu: add usb-serial support · e3a04455
      Guannan Ren 提交于
      Add an optional 'type' attribute to <target> element of serial port
      device. There are two choices for its value, 'isa-serial' and
      'usb-serial'. For backward compatibility, when attribute 'type' is
      missing the 'isa-serial' will be chosen as before.
      
      Libvirt XML sample
      
          <serial type='pty'>
            <target type='usb-serial' port='0'/>
            <address type='usb' bus='0' port='1'/>
          </serial>
      
      qemu commandline:
      
      qemu ${other_vm_args}              \
          -chardev pty,id=charserial0    \
          -device usb-serial,chardev=charserial0,id=serial0,bus=usb.0,port=1
      e3a04455
  8. 08 1月, 2013 2 次提交
    • E
      build: avoid compiler warning · 0a5eaf0d
      Eric Blake 提交于
      gcc 4.1.2 on RHEL 5 warned:
      conf/network_conf.c:3136: warning: 'foundIdx' may be used uninitialized in this function
      
      The warning is spurious, but initializing the variable doesn't hurt.
      
      * src/conf/network_conf.c (virNetworkDefUpdateDNSHost): Silence
      unused variable warning.
      0a5eaf0d
    • J
      S390: Add SCLP console front end support · d760255d
      J.B. Joret 提交于
      The SCLP console is the native console type for s390 and is preferred
      over the virtio console as it doesn't require special drivers and
      is more efficient. Recent versions of QEMU come with SCLP support
      which is hereby enabled.
      
      The new target types 'sclp' and 'sclplm' can be used to specify a
      SCLP console. Adding documentation, domain schema and XML processing
      support.
      Signed-off-by: NJ.B. Joret <jb@linux.vnet.ibm.com>
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      d760255d
  9. 07 1月, 2013 1 次提交
    • O
      conf: Parse and format the new XML · 535aed56
      Osier Yang 提交于
      Like "rawio", "sgio" is only allowed for block disk of device
      type "lun".
      
      It doesn't default disk->sgio to "filtered" when parsing, as
      it won't be able to distinguish explicitly requested "filtered"
      and a default "filtered" in driver then. We have to error out for
      explicit request when the kernel doesn't support the new sysfs
      knob "unpriv_sgio", however, for defaulted "filtered", we can
      just ignore it if the kernel doesn't support "unpriv_sgio".
      535aed56
  10. 05 1月, 2013 5 次提交
    • P
      snapshot: conf: Make virDomainSnapshotIsExternal more reusable · 51b12b8c
      Peter Krempa 提交于
      Allow to use definition objects with this predicate function.
      51b12b8c
    • J
      conf: Add unix socket support to virChrdevOpen · 66a06649
      John Eckersberg 提交于
      This also changes the function signature to take a
      virDomainChrSourceDefPtr instead of just a path, since it needs to
      differentiate behavior based on source->type.
      66a06649
    • J
      conf: Rename console-specific identifiers to be more generic · 3c971c67
      John Eckersberg 提交于
      The functionality provided in virchrdev.c (previously virconsole.c) is
      applicable to other types of character devices besides consoles, such
      as channels.  This patch is just code motion, renaming things such as
      "console" or "pty", instead using more general terms such as
      "character device" or "device path".
      3c971c67
    • J
      conf: Rename virconsole.* to virchrdev.* · 4c85421c
      John Eckersberg 提交于
      This is just code motion, in preparation to rename identifiers to be
      less console-specific.
      4c85421c
    • E
      network: fix check for ambiguous lookup · f5b654e3
      Eric Blake 提交于
      gcc -O2 complained:
      ../../src/conf/network_conf.c: In function 'virNetworkDefUpdateDNSSrv':
      ../../src/conf/network_conf.c:3232: error: 'foundIdx' may be used uninitialized in this function [-Wuninitialized]
      
      It turned out to be a spurious warning (we didn't use foundIdx
      unless foundCt was non-zero).  But in investigating that, I noticed
      a worse problem: we were using 'if (foundCt > 1)', but since foundCt
      was bool, it could never be > 1.
      
      * src/conf/network_conf.c (virNetworkDefUpdateDNSHost): Use
      correct type.
      (virNetworkDefUpdateDNSSrv): Likewise, and silence compiler
      warning.
      f5b654e3
  11. 21 12月, 2012 14 次提交
  12. 19 12月, 2012 1 次提交