1. 11 11月, 2016 1 次提交
    • P
      qemu: process: detect if dimm aliases are broken on reconnect · 93d9ff3d
      Peter Krempa 提交于
      Detect on reconnect to a running qemu VM whether the alias of a
      hotpluggable memory device (dimm) does not match the dimm slot number
      where it's connected to. This is necessary as qemu is actually
      considering the alias as machine ABI used to connect the backend object
      to the dimm device.
      
      This will require us to keep them consistent so that we can reliably
      restore them on migration. In some situations it was currently possible
      to create a mismatched configuration and qemu would refuse to restore
      the migration stream.
      
      To avoid breaking existing VMs we'll need to keep the old algorithm
      though.
      93d9ff3d
  2. 26 10月, 2016 1 次提交
    • J
      qemu: Add a secret object to/for a char source dev · daf5c651
      John Ferlan 提交于
      Add the secret object so the 'passwordid=' can be added if the command line
      if there's a secret defined in/on the host for TCP chardev TLS objects.
      
      Preparation for the secret involves adding the secinfo to the char source
      device prior to command line processing. There are multiple possibilities
      for TCP chardev source backend usage.
      
      Add test for at least a serial chardev as an example.
      daf5c651
  3. 25 10月, 2016 1 次提交
  4. 24 10月, 2016 1 次提交
    • P
      domain: Add optional 'tls' attribute for TCP chardev · 0298531b
      Pavel Hrdina 提交于
      Add an optional "tls='yes|no'" attribute for a TCP chardev.
      
      For QEMU, this will allow for disabling the host config setting of the
      'chardev_tls' for a domain chardev channel by setting the value to "no" or
      to attempt to use a host TLS environment when setting the value to "yes"
      when the host config 'chardev_tls' setting is disabled, but a TLS environment
      is configured via either the host config 'chardev_tls_x509_cert_dir' or
      'default_tls_x509_cert_dir'
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      0298531b
  5. 22 10月, 2016 1 次提交
    • J
      conf: Move the privateData from virDomainChrDef to virDomainChrSourceDef · 7bd8312e
      John Ferlan 提交于
      Commit id '5f2a1327' should have placed the data in the host source
      def structure since that's also used by smartcard, redirdev, and rng in
      order to provide a backend tcp channel.  The data in the private structure
      will be necessary in order to provide the secret properly.
      
      This also renames the previous names from "Chardev" to "ChrSource" for
      the private data structures and API's
      7bd8312e
  6. 20 10月, 2016 1 次提交
    • J
      qemu: Introduce qemuDomainChardevPrivatePtr · 5f2a1327
      John Ferlan 提交于
      Modeled after the qemuDomainHostdevPrivatePtr (commit id '27726d8c'),
      create a privateData pointer in the _virDomainChardevDef to allow storage
      of private data for a hypervisor in order to at least temporarily store
      secret data for usage during qemuBuildCommandLine.
      
      NB: Since the qemu_parse_command (qemuParseCommandLine) code is not
      expecting to restore the secret data, there's no need to add code
      code to handle this new structure there.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      5f2a1327
  7. 12 10月, 2016 1 次提交
  8. 21 9月, 2016 1 次提交
  9. 20 9月, 2016 1 次提交
  10. 12 9月, 2016 1 次提交
    • J
      qemu: Don't use query-migrate on destination · 56258a38
      Jiri Denemark 提交于
      When migration fails, we need to poke QEMU monitor to check for a reason
      of the failure. We did this using query-migrate QMP command, which is
      not supposed to return any meaningful result on the destination side.
      Thus if the monitor was still functional when we detected the migration
      failure, parsing the answer from query-migrate always failed with the
      following error message:
      
          "info migration reply was missing return status"
      
      This irrelevant message was then used as the reason for the migration
      failure replacing any message we might have had.
      
      Let's use harmless query-status for poking the monitor to make sure we
      only get an error if the monitor connection is broken.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1374613Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      56258a38
  11. 25 8月, 2016 4 次提交
    • P
      qemu: process: Copy final vcpu order information into the vcpu definition · 20ef1232
      Peter Krempa 提交于
      The vcpu order information is extracted only for hotpluggable entities,
      while vcpu definitions belonging to the same hotpluggable entity need
      to all share the order information.
      
      We also can't overwrite it right away in the vcpu info detection code as
      the order is necessary to add the hotpluggable vcpus enabled on boot in
      the correct order.
      
      The helper will store the order information in places where we are
      certain that it's necessary.
      20ef1232
    • P
      qemu: migration: Prepare for non-contiguous vcpu configurations · 48e3d428
      Peter Krempa 提交于
      Introduce a new migration cookie flag that will be used for any
      configurations that are not compatible with libvirt that would not
      support the specific vcpu hotplug approach. This will make sure that old
      libvirt does not fail to reproduce the configuration correctly.
      48e3d428
    • P
      qemu: domain: Prepare for VCPUs vanishing while libvirt is not running · 133be0a9
      Peter Krempa 提交于
      Similarly to devices the guest may allow unplug of the VCPU if libvirt
      is down. To avoid problems, refresh the vcpu state on reconnect. Don't
      mess with the vcpu state otherwise.
      133be0a9
    • P
      qemu: domain: Extract cpu-hotplug related data · 6b4a23ff
      Peter Krempa 提交于
      Now that the monitor code gathers all the data we can extract it to
      relevant places either in the definition or the private data of a vcpu.
      
      As only thread id is broken for TCG guests we may extract the rest of
      the data and just skip assigning of the thread id. In case where qemu
      would allow cpu hotplug in TCG mode this will make it work eventually.
      6b4a23ff
  12. 04 8月, 2016 2 次提交
  13. 02 8月, 2016 1 次提交
  14. 26 7月, 2016 2 次提交
    • T
      qemu: remove ccwaddrs caching · 1aa5e66c
      Tomasz Flendrich 提交于
      Dropping the caching of ccw address set.
      The cached set is not required anymore, because the set is now being
      recalculated from the domain definition on demand, so the cache
      can be deleted.
      1aa5e66c
    • T
      qemu: remove vioserialaddrs caching · 19a148b7
      Tomasz Flendrich 提交于
      Dropping the caching of virtio serial address set.
      The cached set is not required anymore, because the set is now being
      recalculated from the domain definition on demand, so the cache
      can be deleted.
      
      Credit goes to Cole Robinson.
      19a148b7
  15. 21 7月, 2016 1 次提交
    • J
      Reserve existing USB addresses · ddd31fd7
      Ján Tomko 提交于
      Check if they fit on the USB controllers the domain has,
      and error out if two devices try to use the same address.
      ddd31fd7
  16. 11 7月, 2016 2 次提交
  17. 02 7月, 2016 1 次提交
  18. 24 6月, 2016 2 次提交
  19. 09 6月, 2016 1 次提交
  20. 08 6月, 2016 1 次提交
    • P
      qemu: domain: Implement helper for one-shot log entries to the VM log file · 91a6eacc
      Peter Krempa 提交于
      Along with the virtlogd addition of the log file appending API implement
      a helper for logging one-shot entries to the log file including the
      fallback approach of using direct file access.
      
      This will be used for noting the shutdown of the qemu proces and
      possibly other actions such as VM migration and other critical VM
      lifecycle events.
      91a6eacc
  21. 25 5月, 2016 4 次提交
    • J
      qemu: Remove unused persistentAddrs · fb063500
      John Ferlan 提交于
      Based on some digital archaeology performed by jtomko, it's been determined
      that the persistentAddrs variable is no longer necessary...
      
      The variable was added by:
      commit 141dea6b
      CommitDate: 2010-02-12 17:25:52 +0000
          Add persistence of PCI addresses to QEMU
      
      Where it was set to 0 on domain startup if qemu did not support the
      QEMUD_CMD_FLAG_DEVICE capability, to clear the addresses at shutdown,
      because QEMU might make up different ones next time.
      
      As of commit f5dd58a6
      CommitDate: 2012-07-11 11:19:05 +0200
          qemu: Extended qemuDomainAssignAddresses to be callable from
          everywhere.
      
      this was broken, when the persistentAddrs = 0 assignment was moved
      inside qemuDomainAssignPCIAddresses and while it pretends to check
      for !QEMU_CAPS_DEVICE, its parent qemuDomainAssignAddresses is only
      called if QEMU_CAPS_DEVICE is present.
      fb063500
    • P
      qemu: process: Fix and improve disk data extraction · 894dc85f
      Peter Krempa 提交于
      Extract information for all disks and update tray state and source only
      for removable drives. Additionally store whether a drive is removable
      and whether it has a tray.
      894dc85f
    • P
      qemu: Extract more information about qemu drives · f1690dc3
      Peter Krempa 提交于
      Extract whether a given drive has a tray and whether there is no image
      inserted.
      
      Negative logic for the image insertion is chosen so that the flag is set
      only if we are certain of the fact.
      f1690dc3
    • P
      5f963d89
  22. 23 5月, 2016 1 次提交
  23. 16 5月, 2016 1 次提交
    • J
      secret: Alter virSecretGetSecretString · abd2272c
      John Ferlan 提交于
      Rather than returning a "char *" indicating perhaps some sized set of
      characters that is NUL terminated, alter the function to return 0 or -1
      for success/failure and add two parameters to handle returning the
      buffer and it's size.
      
      The function no longer encodes the returned secret, rather it returns
      the unencoded secret forcing callers to make the necessary adjustments.
      
      Alter the callers to handle the adjusted model.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      abd2272c
  24. 12 5月, 2016 2 次提交
  25. 09 5月, 2016 1 次提交
  26. 06 5月, 2016 3 次提交
    • J
      qemu: Introduce qemuDomainSecretIV · bead05ea
      John Ferlan 提交于
      Add the data structure and infrastructure to support an initialization
      vector (IV) secrets. The IV secret generation will need to have access
      to the domain private master key, so let's make sure the prepare disk
      and hostdev functions can accept that now.
      
      Anywhere that needs to make a decision over which secret type to use
      in order to fill in or use the IV secret has a switch added.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      bead05ea
    • J
      qemu: Split out the master key create and write · 608dfc6a
      John Ferlan 提交于
      A recent review of related changes noted that we should split the creation
      (or generation) of the master key into the qemuProcessPrepareDomain and leave
      the writing of the master key for qemuProcessPrepareHost.
      
      Made the adjustment and modified some comments to functions that have
      changed calling parameters, but didn't change the intro doc.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      608dfc6a
    • J
      qemu: Adjust names of qemuDomainSecretInfoType enums · 70ae856e
      John Ferlan 提交于
      From a review after push, add the "_TYPE" into the name.
      
      Also use qemuDomainSecretInfoType in the struct rather than int
      with the comment field containing the struct name
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      70ae856e
  27. 03 5月, 2016 1 次提交