1. 06 9月, 2016 4 次提交
  2. 03 9月, 2016 3 次提交
  3. 25 8月, 2016 11 次提交
    • P
      qemu: command: Add support for sparse vcpu topologies · 9eb9106e
      Peter Krempa 提交于
      Add support for using the new approach to hotplug vcpus using device_add
      during startup of qemu to allow sparse vcpu topologies.
      
      There are a few limitations imposed by qemu on the supported
      configuration:
      - vcpu0 needs to be always present and not hotpluggable
      - non-hotpluggable cpus need to be ordered at the beginning
      - order of the vcpus needs to be unique for every single hotpluggable
        entity
      
      Qemu also doesn't really allow to query the information necessary to
      start a VM with the vcpus directly on the commandline. Fortunately they
      can be hotplugged during startup.
      
      The new hotplug code uses the following approach:
      - non-hotpluggable vcpus are counted and put to the -smp option
      - qemu is started
      - qemu is queried for the necessary information
      - the configuration is checked
      - the hotpluggable vcpus are hotplugged
      - vcpus are started
      
      This patch adds a lot of checking code and enables the support to
      specify the individual vcpu element with qemu.
      9eb9106e
    • P
      conf: Add XML for individual vCPU hotplug · 5847bc5c
      Peter Krempa 提交于
      Individual vCPU hotplug requires us to track the state of any vCPU. To
      allow this add the following XML:
      
      <domain>
        ...
        <vcpu current='2'>3</vcpu>
        <vcpus>
          <vcpu id='0' enabled='yes' hotpluggable='no' order='1'/>
          <vcpu id='1' enabled='yes' hotpluggable='yes' order='2'/>
          <vcpu id='1' enabled='no' hotpluggable='yes'/>
        </vcpus>
        ...
      
      The 'enabled' attribute allows to control the state of the vcpu.
      'hotpluggable' controls whether given vcpu can be hotplugged and 'order'
      allows to specify the order to add the vcpus.
      5847bc5c
    • P
      tests: cpu-hotplug: Add data for ppc64 without threads enabled · 04fce1d4
      Peter Krempa 提交于
      The reported data is unusual so add it to the test suite.
      04fce1d4
    • P
      tests: cpu-hotplug: Add data for ppc64 out-of-order hotplug · 1c455c47
      Peter Krempa 提交于
      Test the algorithm that extracts the order in which the vcpu entries
      were plugged in on a sample of data created by plugging in vcpus
      arbitrarily.
      1c455c47
    • P
      tests: cpu-hotplug: Add data for ppc64 platform including hotplug · d1145aad
      Peter Krempa 提交于
      Power 8 platform's basic hotpluggable unit is a core rather than a
      thread for x86_64 family. This introduces most of the complexity of the
      matching code and thus needs to be tested.
      
      The test data contain data captured from in-order cpu hotplug and
      unplug operations.
      d1145aad
    • P
      tests: cpu-hotplug: Add data for x86 hotplug with 11+ vcpus · 22e3bb33
      Peter Krempa 提交于
      During review it was reported that adding at least 11 vcpus creates a
      collision of prefixes in the monitor matching algorithm. Add a test case
      to verify that the problem won't happen.
      22e3bb33
    • P
      tests: Add test infrastructure for qemuMonitorGetCPUInfo · f8638471
      Peter Krempa 提交于
      As the combination algorithm is rather complex and ugly it's necessary
      to make sure it works properly. Add test suite infrastructure for
      testing it along with a basic test based on x86_64 platform.
      f8638471
    • P
      qemu: monitor: Extract QOM path from query-cpus reply · c91be16b
      Peter Krempa 提交于
      To allow matching up the data returned by query-cpus to entries in the
      query-hotpluggable-cpus reply for CPU hotplug it's necessary to extract
      the QOM path as it's the only link between the two.
      c91be16b
    • P
      qemu: capabilities: Extract availability of new cpu hotplug for machine types · 920bbe5c
      Peter Krempa 提交于
      QEMU reports whether 'query-hotpluggable-cpus' is supported for a given
      machine type. Extract and cache the information using the capability
      cache.
      
      When copying the capabilities for a new start of qemu, mask out the
      presence of QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS if the machine type
      doesn't support hotpluggable cpus.
      920bbe5c
    • P
      f17ddfee
    • P
      qemu: monitor: Return struct from qemuMonitor(Text|Json)QueryCPUs · b3180425
      Peter Krempa 提交于
      Prepare to extract more data by returning an array of structs rather than
      just an array of thread ids. Additionally report fatal errors separately
      from qemu not being able to produce data.
      b3180425
  4. 24 8月, 2016 1 次提交
    • P
      virsh: respect -q/--quiet more · b620bdee
      Pino Toscano 提交于
      Turn various vshPrint() informative messages into vshPrintExtra(), so
      they are not printed when requesting the quiet mode; neither XML/info
      outputs nor the results of commands are affected.
      Also change the expected outputs of the virsh-undefine test, since virsh
      is invoked in quiet mode there.
      
      Some informative messages might still be converted (and thus silenced
      when in quiet mode), but this is an improvements nonetheless.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1358179
      b620bdee
  5. 20 8月, 2016 3 次提交
    • L
      network: allow limiting a <forwarder> element to certain domains · 0b6336c2
      Laine Stump 提交于
      For some unknown reason the original implementation of the <forwarder>
      element only took advantage of part of the functionality in the
      dnsmasq feature it exposes - it allowed specifying the ip address of a
      DNS server which *all* DNS requests would be forwarded to, like this:
      
         <forwarder addr='192.168.123.25'/>
      
      This is a frontend for dnsmasq's "server" option, which also allows
      you to specify a domain that must be matched in order for a request to
      be forwarded to a particular server. This patch adds support for
      specifying the domain. For example:
      
         <forwarder domain='example.com' addr='192.168.1.1'/>
         <forwarder domain='www.example.com'/>
         <forwarder domain='travesty.org' addr='10.0.0.1'/>
      
      would forward requests for bob.example.com, ftp.example.com and
      joe.corp.example.com all to the DNS server at 192.168.1.1, but would
      forward requests for travesty.org and www.travesty.org to
      10.0.0.1. And due to the second line, requests for www.example.com,
      and odd.www.example.com would be resolved by the libvirt network's own
      DNS server (i.e. thery wouldn't be immediately forwarded) even though
      they also match 'example.com' - the match is given to the entry with
      the longest matching domain. DNS requests not matching any of the
      entries would be resolved by the libvirt network's own DNS server.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1331796
      0b6336c2
    • L
      network: allow disabling dnsmasq's DNS server · 9065cfaa
      Laine Stump 提交于
      If you define a libvirt virtual network with one or more IP addresses,
      it starts up an instance of dnsmasq. It's always been possible to
      avoid dnsmasq's dhcp server (simply don't include a <dhcp> element),
      but until now it wasn't possible to avoid having the DNS server
      listening; even if the network has no <dns> element, it is started
      using default settings.
      
      This patch adds a new attribute to <dns>: enable='yes|no'. For
      backward compatibility, it defaults to 'yes', but if you don't want a
      DNS server created for the network, you can simply add:
      
         <dns enable='no'/>
      
      to the network configuration, and next time the network is started
      there will be no dns server created (if there is dhcp configuration,
      dnsmasq will be started with "port=0" which disables the DNS server;
      if there is no dhcp configuration, dnsmasq won't be started at all).
      9065cfaa
    • L
      network: new network forward mode 'open' · 25e8112d
      Laine Stump 提交于
      The new forward mode 'open' is just like mode='route', except that no
      firewall rules are added to assure that any traffic does or doesn't
      pass. It is assumed that either they aren't necessary, or they will be
      setup outside the scope of libvirt.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=846810
      25e8112d
  6. 19 8月, 2016 1 次提交
    • M
      networkxml2conftest: Don't leak dnsmasq capabilities · 5dd3aa2d
      Michal Privoznik 提交于
      ==18324== 32 bytes in 1 blocks are still reachable in loss record 41 of 114
      ==18324==    at 0x4C2C070: calloc (vg_replace_malloc.c:623)
      ==18324==    by 0x4EA479B: virAlloc (viralloc.c:144)
      ==18324==    by 0x4EA674A: virBitmapNewQuiet (virbitmap.c:77)
      ==18324==    by 0x4EA67F7: virBitmapNew (virbitmap.c:106)
      ==18324==    by 0x4EC777D: dnsmasqCapsNewEmpty (virdnsmasq.c:801)
      ==18324==    by 0x4EC781B: dnsmasqCapsNewFromBuffer (virdnsmasq.c:815)
      ==18324==    by 0x407CF4: mymain (networkxml2conftest.c:99)
      ==18324==    by 0x409CF0: virTestMain (testutils.c:982)
      ==18324==    by 0x4080EA: main (networkxml2conftest.c:136)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      5dd3aa2d
  7. 18 8月, 2016 3 次提交
    • J
      cfg.mk: join not_streq and not_strneq tests · f9785569
      Ján Tomko 提交于
      The marginally nicer error message is not worth the extra lines in
      cfg.mk.
      
      Also drop the excludes since there was only one offender in the tests.
      f9785569
    • J
      tests: fix the return value of test-wrap-argv · 5e045eca
      Ján Tomko 提交于
      The script was returning success unless it failed on the last file.
      This went unnoticed because sc_prohibit_long_lines forbids lines
      longer than 90 characters in .arg[sv] files.
      5e045eca
    • J
      Introduce QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY · 41f5c2ca
      Ján Tomko 提交于
      Check whether the disable-legacy property is present on the following
      devices:
        virtio-balloon-pci
        virtio-blk-pci
        virtio-scsi-pci
        virtio-serial-pci
        virtio-9p-pci
        virtio-net-pci
        virtio-rng-pci
        virtio-gpu-pci
        virtio-input-host-pci
        virtio-keyboard-pci
        virtio-mouse-pci
        virtio-tablet-pci
      
      Assuming that if QEMU knows other virtio devices where this property
      is applicable, it will have at least one of these devices.
      
      Added in QEMU by:
      commit e266d421490e0ae83044bbebb209b2d3650c0ba6
          virtio-pci: add flags to enable/disable legacy/modern
      41f5c2ca
  8. 17 8月, 2016 2 次提交
  9. 16 8月, 2016 3 次提交
    • P
      utils: storage: Fix JSON field name for uri based storage · c2e12b01
      Peter Krempa 提交于
      qemu uses 'url' instead of 'uri'. They unfortunately look very similar.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1367260
      c2e12b01
    • J
      conf: report an error message for non-existing USB hubs · ef66bd5d
      Ján Tomko 提交于
      If any of the devices referenced a USB hub that does not exist,
      defining the domain would either fail with:
      error: An error occurred, but the cause is unknown
      (if only the last hub in the path is missing)
      or crash.
      
      Return a proper error instead of crashing.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1367130
      ef66bd5d
    • R
      tests: fix domaincapstest linking for libxl · da5dfd0e
      Roman Bogorodskiy 提交于
      Commit 11567cf6 added some libxl tests into domaincapstest and
      added libvirt_driver_libxl_impl.la to domaincapstest_LDADD.
      
      This causes link fail on systems without GNU regex implementation:
      
      gmake[2]: Entering directory '/usr/home/novel/code/libvirt/tests'
        CCLD     domaincapstest
        ../src/.libs/libvirt_driver_libxl_impl.a(libvirt_driver_libxl_impl_la-libxl_capabilities.o):
        In function `libxlMakeCapabilities':
        libxl/libxl_capabilities.c:(.text+0x6b2): undefined reference to
        `rpl_regcomp'
        libxl/libxl_capabilities.c:(.text+0x6d0): undefined reference to
        `rpl_regerror'
        libxl/libxl_capabilities.c:(.text+0x803): undefined reference to
        `rpl_regexec'
        libxl/libxl_capabilities.c:(.text+0xa58): undefined reference to
        `rpl_regfree'
        clang-3.8: error: linker command failed with exit code 1 (use -v to
        see invocation)
      
      This happens because on these system it tries to use gnulib's builtin
      regex implementation, but doesn't link to gnulib.
      
      Fix by adding $(GNULIB_LIBS) along with libvirt_driver_libxl_impl.la to
      domaincapstest_LDADD.
      da5dfd0e
  10. 15 8月, 2016 1 次提交
    • 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
  11. 12 8月, 2016 3 次提交
    • 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
  12. 10 8月, 2016 4 次提交
  13. 05 8月, 2016 1 次提交