1. 16 7月, 2013 2 次提交
    • J
      Add qemuMonitorJSONGetObjectProperty() method for QMP qom-get command · bdce2789
      John Ferlan 提交于
      Add a new qemuMonitorJSONGetObjectProperty() method to support invocation
      of the 'qom-get' JSON monitor command with a provided path, property, and
      expected data type return. The qemuMonitorJSONObjectProperty is similar to
      virTypedParameter; however, a future patch will extend it a bit to include
      a void pointer to balloon driver statistic data.
      
      NOTE: The ObjectProperty structures and API are added only for the
            purpose of the qemumonitorjsontest
      
      The provided test will execute a qom-get on "/machine/i440fx" which will
      return a property "realized".
      bdce2789
    • J
      Add qemuMonitorJSONGetObjectListPaths() method for QMP qom-list command · d76a8978
      John Ferlan 提交于
      Add a new qemuMonitorJSONGetObjectListPaths() method to support invocation
      of the 'qom-list' JSON monitor command with a provided path.
      
      NOTE: The ListPath structures and API's are added only for the
            purpose of the qemumonitorjsontest
      
      The returned list of paired data fields of "name" and "type" that can
      be used to peruse QOM configuration data and eventually utilize for the
      balloon statistics.
      
      The test does a "{"execute":"qom-list", "arguments": { "path": "/"}}" which
      returns "{"return": [{"name": "machine", "type": "child<container>"},
      {"name": "type", "type": "string"}]}" resulting in a return of an array
      of 2 elements with [0].name="machine", [0].type="child<container>".  The [1]
      entry appears to be a header that could be used some day via a command such
      as "virsh qemuobject --list" to format output.
      d76a8978
  2. 12 7月, 2013 4 次提交
  3. 11 7月, 2013 1 次提交
  4. 10 7月, 2013 3 次提交
  5. 08 7月, 2013 1 次提交
    • J
      Resolve Coverity complaints in tests/securityselinuxlabeltest.c · a443c3a7
      John Ferlan 提交于
      Two complaints of RESOURCE_FREE due to going to cleanup prior to a
      VIR_FREE(line).  Two complaints of FORWARD_NULL due to 'tmp' being
      accessed after a strchr() without first checking if the return was NULL.
      
      While looking at the code it seems that 'line' need only be allocated
      once as the while loop will keep reading into line until eof causing
      an unreported leak since line was never VIR_FREE()'d at the bottom of
      the loop.
      a443c3a7
  6. 05 7月, 2013 1 次提交
  7. 01 7月, 2013 1 次提交
  8. 28 6月, 2013 2 次提交
  9. 27 6月, 2013 1 次提交
    • L
      nodedev: add iommuGroup to node device object · 8807b285
      Laine Stump 提交于
      This includes adding it to the nodedev parser and formatter, docs, and
      test.
      
      An example of the new iommuGroup element that is a part of the output
      from "virsh nodedev-dumpxml" (virNodeDeviceGetXMLDesc()):
      
        <device>
          <name>pci_0000_02_00_1</name>
          <capability type='pci'>
          ...
            <iommuGroup number='12'>
              <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
              <address domain='0x0000' bus='0x02' slot='0x00' function='0x1'/>
            </iommuGroup>
          </capability>
        </device>
      8807b285
  10. 26 6月, 2013 1 次提交
    • L
      test: include qemuhotplugtest data files in source rpm · ec30f0f7
      Laine Stump 提交于
      commit 0fc12bca added a new test called qemuhotplugtest which has
      several data files in tests/qemuhotplugtestdata, but didn't add that
      directory to EXTRA_DIST in the tests Makefile.am, so the make check
      done during a make rpm was failing due to missing data files.
      ec30f0f7
  11. 25 6月, 2013 2 次提交
  12. 21 6月, 2013 3 次提交
    • J
      storage: add support for creating qcow2 images with extensions · 6298f74d
      Ján Tomko 提交于
      Add -o compat= and -o lazy_refcounts options for qemu-img.
      6298f74d
    • J
      conf: add features to volume target XML · 31d42506
      Ján Tomko 提交于
      Add <features> and <compat> elements to volume target XML.
      
      <compat> is a string which for qcow2 represents the QEMU version
      it should be compatible with. Valid values are 0.10 and 1.1.
      1.1 is implicit if the <features> element is present, otherwise
      qemu-img default is used. 0.10 can be specified to explicitly
      create older images after the qemu-img default changes.
      
      <features> contains optional features, so far
      <lazy_refcounts/> is available, which enables caching of reference
      counters, improving performance for snapshots.
      31d42506
    • J
      qemu: add hv_vapic and hv_spinlocks support · 19f75d5e
      Ján Tomko 提交于
      XML:
      <features>
        <hyperv>
          <vapic state='on'/>
          <spinlocks state='on' retries='4096'/>
        </hyperv>
      </features>
      
      results in the following QEMU command line:
      qemu -cpu <cpu_model>,hv_vapic,hv_spinlocks=0x1000
      
      https://bugzilla.redhat.com/show_bug.cgi?id=784836
      19f75d5e
  13. 19 6月, 2013 1 次提交
    • J
      util: switch virBufferTrim to void · d0d0413e
      Ján Tomko 提交于
      We don't care whether the trim was succesful or not anywhere
      except the tests.
      
      Switch it to void and set the buffer error on wrong usage.
      d0d0413e
  14. 11 6月, 2013 1 次提交
  15. 07 6月, 2013 1 次提交
  16. 06 6月, 2013 3 次提交
    • J
      qemu: change two-state int parameters to bool · 5debc722
      Ján Tomko 提交于
      5debc722
    • J
      Replace two-state local integers with bool · e557766c
      Ján Tomko 提交于
      Found with 'git grep "= 1"'.
      e557766c
    • M
      qemu: Reformat listen address prior to checking · e5fa9db1
      Michal Privoznik 提交于
      Currently, a listen address for a SPICE server can be specified. Later,
      when the domain is migrated, we need to relocate the graphics which
      involves telling new destination to the SPICE server. However, we can't
      just assume the listen address is the new location, because the listen
      address can be ANYCAST (0.0.0.0 for IPv4, :: for IPv6). In which case,
      we want to pass the remote hostname. But there are some troubles with
      ANYCAST. In both IPv4 and IPv6 it has many ways for specifying such
      address. For instance, in IPv4: 0, 0.0, 0.0.0, 0.0.0.0.  The number of
      variations gets bigger in IPv6 world. Hence, in order to check for
      ANYCAST address sanely, we should take the provided listen address,
      parse it and format back in it's full form. Which is exactly what this
      patch does.
      e5fa9db1
  17. 05 6月, 2013 1 次提交
  18. 04 6月, 2013 1 次提交
  19. 03 6月, 2013 1 次提交
  20. 01 6月, 2013 3 次提交
    • O
      conf: Generate address for scsi host device automatically · cdb97895
      Osier Yang 提交于
      With unknown good reasons, the attribute "bus" of scsi device
      address is always set to 0, same for attribute "target". (See
      virDomainDiskDefAssignAddress).
      
      Though we might need to change the algorithm to honor "bus"
      and "target" too, that's a different issue. The address generator
      for scsi host device in this patch just follows the unknown
      good reasons, only considering the "controller" and "unit".
      It walks through all scsi controllers and their units, to see
      if the address $controller:0:0:$unit can be used (if not used
      by any disk or scsi host device yet), if found one, it sits on
      it, otherwise, it creates a new controller (actually the controller
      is implicitly created by someone else), and sits on
      $new_controller:0:0:0 instead.
      cdb97895
    • E
      build: skip qemu in tests when !WITH_QEMU · 3d2b9715
      Eric Blake 提交于
      A mingw build (where the qemu driver is not built, so WITH_QEMU
      is undefined) failed with:
      
      In file included from ../../src/qemu/qemu_command.h:30:0,
                       from ../../tests/testutilsqemu.h:4,
                       from ../../tests/networkxml2xmltest.c:14:
      ../../src/qemu/qemu_conf.h:53:4: error: #error "Port me"
      
      But since testutilsqemu.c is already conditional, the header
      should be likewise.
      
      * tests/testutilsqemu.h: Make content conditional.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      3d2b9715
    • D
      Introduce virFilePrintf() as a portable fprintf() · a2619962
      Daniel P. Berrange 提交于
      We can't use GNULIB's fprintf-posix due to licensing
      incompatibilities. We do already have a portable
      formatting via virAsprintf() which we got from GNULIB
      though. We can use to create a virFilePrintf() function.
      
      But really gnulib could just provide a 'fprintf'
      module, that depended on just its 'asprintf' module.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      a2619962
  21. 24 5月, 2013 2 次提交
    • M
      virStrndup: Accept negative values as string length · c9357196
      Michal Privoznik 提交于
      It may shorten the code a bit as the following pattern:
      
        VIR_STRNDUP(dst, src, cond ? n : strlen(src))
      
      is used on several places among our code. However, we can
      move the strlen into virStrndup and thus write just:
      
        VIR_STRNDUP(dst, src, cond ? n : -1)
      c9357196
    • V
      cgroups: Do not enforce nonexistent controllers · eb21408f
      Viktor Mihajlovski 提交于
      Currently, the controllers argument to virCgroupDetect acts both as
      a result filter and a required controller specification, which is
      a bit overloaded. If both functionalities are needed, it would be
      better to have them seperated into a filter and a requirement mask.
      The only situation where it is used today is to ensure that only
      CPU related controllers are used for the VCPU directories. But here
      we clearly do not want to enforce the existence of cpu, cpuacct and
      specifically not cpuset at the same time.
      This commit changes the semantics of controllers to "filter only".
      Should a required mask ever be needed, more work will have to be done.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      eb21408f
  22. 22 5月, 2013 3 次提交
  23. 21 5月, 2013 1 次提交