1. 06 12月, 2017 2 次提交
  2. 25 11月, 2017 2 次提交
  3. 24 11月, 2017 1 次提交
  4. 23 11月, 2017 1 次提交
    • P
      qemu: domain: Don't call namespace setup for storage already accessed by vm · 3746a38e
      Peter Krempa 提交于
      When doing block commit we need to allow write for members of the
      backing chain so that we can commit the data into them.
      
      qemuDomainDiskChainElementPrepare was used for this which since commit
      786d8d91 calls qemuDomainNamespaceSetupDisk which has very adverse
      side-effects, namely it relabels the nodes to the same label it has in
      the main namespace. This was messing up permissions for the commit
      operation since its touching various parts of a single backing chain.
      
      Since we are are actually not introducing new images at that point add a
      flag for qemuDomainDiskChainElementPrepare which will refrain from
      calling to the namespace setup function.
      
      Calls from qemuDomainSnapshotCreateSingleDiskActive and
      qemuDomainBlockCopyCommon do introduce new members all calls from
      qemuDomainBlockCommit do not, so the calls are anotated accordingly.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1506072
      3746a38e
  5. 03 11月, 2017 3 次提交
    • A
      Remove backslash alignment attempts · 3e7db8d3
      Andrea Bolognani 提交于
      Right-aligning backslashes when defining macros or using complex
      commands in Makefiles looks cute, but as soon as any changes is
      required to the code you end up with either distractingly broken
      alignment or unnecessarily big diffs where most of the changes
      are just pushing all backslashes a few characters to one side.
      
      Generated using
      
        $ git grep -El '[[:blank:]][[:blank:]]\\$' | \
          grep -E '*\.([chx]|am|mk)$$' | \
          while read f; do \
            sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \
          done
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      3e7db8d3
    • P
      qemu: domain: Remove pointless alias check · beb1661f
      Peter Krempa 提交于
      When attaching the disks, aliases are always generated.
      beb1661f
    • P
      qemu: domain: Simplify using DAC permissions of top of backing chain · 2b757b96
      Peter Krempa 提交于
      qemuDomainGetImageIds and qemuDomainStorageFileInit are helpful when
      trying to access a virStorageSource from the qemu driver since they
      figure out the correct uid and gid for the image.
      
      When accessing members of a backing chain the permissions for the top
      level would be used. To allow using specific permissions per backing
      chain level but still allow inheritance from the parent of the chain we
      need to add a new parameter to the image ID APIs.
      2b757b96
  6. 26 10月, 2017 1 次提交
    • J
      qemu: Add pause-before-switchover migration capability · 6addde24
      Jiri Denemark 提交于
      This new capability enables a pause before device state serialization so
      that we can finish all block jobs without racing with the end of the
      migration. The pause is indicated by "pre-switchover" state. Once we're
      done QEMU enters "device" migration state.
      
      This patch just defines the new capability and QEMU migration states and
      their mapping to our job states.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      6addde24
  7. 20 10月, 2017 4 次提交
  8. 19 10月, 2017 3 次提交
    • J
      Move qemuCheckCCWS390AddressSupport to qemu_domain · 5ec76b0c
      Ján Tomko 提交于
      Let it be reused in qemu_domain_address.
      5ec76b0c
    • P
      qemu: send allowReboot in migration cookie · e859da6f
      Pavel Hrdina 提交于
      We need to send allowReboot in the migration cookie to ensure the same
      behavior of the virDomainSetLifecycleAction() API on the destination.
      
      Consider this scenario:
      
          1. On the source the domain is started with:
              <on_poweroff>destroy</on_poweroff>
              <on_reboot>restart</on_reboot>
              <on_crash>destroy</on_crash>
      
          2. User calls an API to set "destroy" for <on_reboot>:
              <on_poweroff>destroy</on_poweroff>
              <on_reboot>destroy</on_reboot>
              <on_crash>destroy</on_crash>
      
          3. The guest is migrated to a different host
      
          4a. Without the allowReboot in the migration cookie the QEMU
              process on destination would be started with -no-reboot
              which would prevent using the virDomainSetLifecycleAction() API
              for the rest of the guest lifetime.
      
          4b. With the allowReboot in the migration cookie the QEMU process
              on destination is started without -no-reboot like it was started
              on the source host and the virDomainSetLifecycleAction() API
              continues to work.
      
      The following patch adds a QEMU implementation of the
      virDomainSetLifecycleAction() API and that implementation disallows
      using the API if all actions are set to "destroy" because we add
      "-no-reboot" on the QEMU command line.  Changing the lifecycle action
      is in this case pointless because the QEMU process is always terminated.
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      e859da6f
    • P
      qemu: move detection whether to use -no-reboot to qemu_domain · a9d637e7
      Pavel Hrdina 提交于
      This will be used later on in implementation of new API
      virDomainSetLifecycleAction().  In order to use it, we need to store
      the value in status XML to not lose the information if libvirtd is
      restarted.
      
      If some guest was started by old libvirt where it was not possible
      to change the lifecycle action for running guest, we can safely
      detect it based on the current actions from the status XML.
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      a9d637e7
  9. 18 10月, 2017 1 次提交
    • E
      maint: Replace tabs with spaces in all source files in repo · b08017ca
      Erik Skultety 提交于
      So we have a syntax-check rule to catch all tab indents but it naturally
      can't catch tab spacing, i.e. as a delimiter. This patch is a result of
      running 'vim -en +retab +wq'
      (using tabstop=8 softtabstop=4 shiftwidth=4 expandtab) on each file from
      a list generated by the following:
      find . -regextype gnu-awk \
               -regex ".*\.(rng|syms|html|s?[ch]|py|pl|php(\.code)?)(\.in)?" \
               | xargs git grep -lP "\t"
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      b08017ca
  10. 17 10月, 2017 1 次提交
  11. 12 10月, 2017 1 次提交
  12. 06 10月, 2017 1 次提交
  13. 05 10月, 2017 3 次提交
  14. 04 10月, 2017 1 次提交
    • L
      qemu: Support multiqueue virtio-blk · abca72fa
      Lin Ma 提交于
      qemu 2.7.0 introduces multiqueue virtio-blk(commit 2f27059).
      This patch introduces a new attribute "queues". An example of
      the XML:
      
      <disk type='file' device='disk'>
        <driver name='qemu' type='qcow2' queues='4'/>
      
      The corresponding QEMU command line:
      
      -device virtio-blk-pci,scsi=off,num-queues=4,id=virtio-disk0
      Signed-off-by: NLin Ma <lma@suse.com>
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      abca72fa
  15. 28 9月, 2017 1 次提交
    • J
      qemu: Introduce qemuDomainPrepareDiskSource · 5c09486c
      John Ferlan 提交于
      Introduce a function to setup any TLS needs for a disk source.
      
      If there's a configuration or other error setting up the disk source
      for TLS, then cause the domain startup to fail.
      
      For VxHS, follow the chardevTLS model where if the src->haveTLS hasn't
      been configured, then take the system/global cfg->haveTLS setting for
      the storage source *and* mark that we've done so via the tlsFromConfig
      setting in storage source.
      
      Next, if we are using TLS, then generate an alias into a virStorageSource
      'tlsAlias' field that will be used to create the TLS object and added to
      the disk object in order to link the two together for QEMU.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      5c09486c
  16. 27 9月, 2017 1 次提交
    • P
      qemu: domain: Extract common clearing of VM private data · 3685e2dd
      Peter Krempa 提交于
      VM private data is cleared when the VM is turned off and also when the
      VM object is being freed. Some of the clearing code was duplicated.
      Extract it to a separate function.
      
      This also removes the now unnecessary function
      qemuDomainClearPrivatePaths.
      3685e2dd
  17. 21 9月, 2017 1 次提交
  18. 14 9月, 2017 1 次提交
    • P
      qemu: Remove support for legacy block jobs · 2350d101
      Peter Krempa 提交于
      Block job QMP commands with underscores rather than dashes were never
      released in upstream qemu, (they were added, but modified in the same
      release [1]), but a certain distro managed to backport the version in the
      middle.
      
      The change also slightly modified semantics for the abort command, which
      made us have a lot of code which was only ever present in certain
      downstream distros.
      
      Clean the upstream code from the legacy cruft and support only the
      upstream implementations.
      
      [1] See qemu commit v1.0-2176-gdb58f9c060
      Reviewed-by: NEric Blake <eblake@redhat.com>
      2350d101
  19. 13 9月, 2017 1 次提交
    • J
      qemu: Clean up qemuDomainSecretPrepare · 23706c17
      John Ferlan 提交于
      No need to pass a @driver parameter since all that's done is deref
      the @cfg especially since the only caller can just pass an already
      referenced @cfg.
      
      Also, looks like commit id '0298531b' at one time had a different
      name for the API, so I took the liberty of fixing the comments too
      since I would already be updating them for the @cfg variable.
      23706c17
  20. 07 9月, 2017 6 次提交
  21. 29 8月, 2017 1 次提交
  22. 25 7月, 2017 2 次提交
  23. 10 7月, 2017 1 次提交
    • P
      qemu: domain: Use vcpu 'node-id' property and pass it back to qemu · ccac4465
      Peter Krempa 提交于
      vcpu properties gathered from query-hotpluggable cpus need to be passed
      back to qemu. As qemu did not use the node-id property until now and
      libvirt forgot to pass it back properly (it was parsed but not passed
      around) we did not honor this.
      
      This patch adds node-id to the structures where it was missing and
      passes it around as necessary.
      
      The test data was generated with a VM with following config:
          <numa>
            <cell id='0' cpus='0,2,4,6' memory='512000' unit='KiB'/>
            <cell id='1' cpus='1,3,5,7' memory='512000' unit='KiB'/>
          </numa>
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1452053
      ccac4465