1. 28 8月, 2014 7 次提交
    • J
      qemu_capabilities: Resolve Coverity RESOURCE_LEAK · 2f7ced36
      John Ferlan 提交于
      Coverity determined that on error path that 'mach' wouldn't be free'd
      Since virCapabilitiesFreeGuestMachine() isn't globally available, we'll
      insert first and then if the VIR_STRDUP's fail they it will eventually
      cause the 'mach' to be freed in the error path
      2f7ced36
    • J
      qemu_agent: Resolve Coverity RESOURCE_LEAK · 6f8a4f6d
      John Ferlan 提交于
      Coverity found that on error paths, the 'arg' value wasn't be cleaned
      up. Followed the example in qemuAgentSetVCPUs() where upon successful call
      to qemuAgentCommand() the 'cpus' is set to NULL; otherwise, when cleanup
      occurs the free the memory for 'arg'
      6f8a4f6d
    • J
      qemu_command: Resolve Coverity RESOURCE_LEAK · 461fb555
      John Ferlan 提交于
      In qemuParseISCSIString() if an error was returned, then the call
      to qemuParseDriveURIString() where the uri is free'd wouldn't be run
      461fb555
    • W
      qemu_capabilities: Resolve Coverity RESOURCE_LEAK · 6781d5b5
      Wang Rui 提交于
      In function virQEMUCapsParseMachineTypesStr, VIR_STRNDUP allocates
      memory for 'name' in {do,while} loop. If 'name' isn't freed before
      'continue', its memory will be allocated again in the next loop.
      In this case the memory allocated for 'name' in privious loop is
      useless and not freed. Free it before continue this loop to fix that.
      Signed-off-by: NWang Rui <moon.wangrui@huawei.com>
      6781d5b5
    • J
      qemu_capabilities: Resolve Coverity NULL_RETURNS · cabebc0c
      John Ferlan 提交于
      Adjust the initialization of qemuCaps() to check for a NULL before
      attempting to dereference like other callers/users do.
      cabebc0c
    • J
      qemu_driver: Resolve Coverity CONSTANT_EXPRESSION_RESULT · 9d7254de
      John Ferlan 提交于
      The call to virDomainSnapshotRedefinePrep() had a spurrious ! in front of
      it which caused Coverity to complan that the expression is always false.
      9d7254de
    • J
      qemu_command: Resolve Coverity REVERSE_INULL · 39b9c121
      John Ferlan 提交于
      In qemuNetworkIfaceConnect() a call to virNetDevBandwidthSet() is
      made where the function prototype requires the first parameter
      (net->ifname) to be non NULL.  Coverity complains that the subsequent
      non NULL check for net->ifname prior to the next call gets flagged as
      an unnecessary check.  Resolve by removing the extra check
      39b9c121
  2. 27 8月, 2014 3 次提交
  3. 26 8月, 2014 2 次提交
    • E
      blkdeviotune: check for overflow when parsing XML · 2f0944de
      Erik Skultety 提交于
      According to docs/schemas/domaincommon.rng and _virDomainBlockIoTuneInfo
      all the iotune values are interpreted as unsigned long long, however
      according to qemu_monitor_json.c, qemu silently truncates numbers
      larger than LLONG_MAX. There's really not much of a usage for such
      large numbers anyway yet. This patch provides the same overflow
      check during a domain start as it does during setting
      a blkdeviotune element in qemu_driver.c and thus reports an error when
      a larger number than LLONG_MAX is detected.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1131876
      2f0944de
    • A
      Add new 'kvm' domain feature and ability to hide KVM signature · d0711642
      Alex Williamson 提交于
      QEMU 2.1 added support for the kvm=off option to the -cpu command,
      allowing the KVM hypervisor signature to be hidden from the guest.
      This enables disabling of some paravirualization features in the
      guest as well as allowing certain drivers which test for the
      hypervisor to load.  Domain XML syntax is as follows:
      
      <domain type='kvm>
        ...
        <features>
          ...
          <kvm>
            <hidden state='on'/>
          </kvm>
        </features>
        ...
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      d0711642
  4. 25 8月, 2014 2 次提交
  5. 23 8月, 2014 1 次提交
    • E
      qemu: check for active domain after agent interaction · 2c551d34
      Eric Blake 提交于
      Commit b606bbb4 reminded me that any time we drop locks to run
      back-to-back guest interaction commands, we have to check that
      the guest didn't disappear in between the two commands.  A quick
      audit found a couple of spots that were missing this check.
      
      * src/qemu/qemu_driver.c (qemuDomainShutdownFlags)
      (qemuDomainSetVcpusFlags): Check that domain is still up.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      2c551d34
  6. 22 8月, 2014 2 次提交
  7. 21 8月, 2014 1 次提交
    • J
      Perform disk config validity checking for attach-device config · 33188c9f
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1078126
      
      Using 'virsh attach-device --config' (or --persistent) to attach a
      file backed lun device will succeed; however, subsequent domain restarts
      will result in failure because the configuration of a file backed lun
      is not supported.
      
      Although allowing 'illegal configurations' is something that can be
      allowed, it may not be practical in this case. Generally, when attaching
      a device to a domain means the domain must be running. A way around
      this is using the --config (or --persistent) option. When an attach
      is done to a running domain, a temporary configuration is modified
      first followed by the live update. The live update will make a number
      of disk validity checks when building the qemu command to attach the
      disk. If any fail, then change is rejected.
      
      Rather than allow a potentially illegal combination, adjust the code
      in the configuration path to make the same checks as the running path
      will make with respect to disk validity checks. This way we avoid
      having the potential for some subsequent start/reboot to fail because
      an illegal combination was allowed.
      
      NB: The live path still checks the configuration since it is possible
      to just do --live guest modification...
      33188c9f
  8. 20 8月, 2014 21 次提交
  9. 19 8月, 2014 1 次提交