1. 08 2月, 2017 1 次提交
  2. 31 1月, 2017 1 次提交
  3. 26 1月, 2017 1 次提交
  4. 10 1月, 2017 1 次提交
  5. 04 1月, 2017 1 次提交
    • J
      qemu: Don't assume secret provided for LUKS encryption · 7f7d9904
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1405269
      
      If a secret was not provided for what was determined to be a LUKS
      encrypted disk (during virStorageFileGetMetadata processing when
      called from qemuDomainDetermineDiskChain as a result of hotplug
      attach qemuDomainAttachDeviceDiskLive), then do not attempt to
      look it up (avoiding a libvirtd crash) and do not alter the format
      to "luks" when adding the disk; otherwise, the device_add would
      fail with a message such as:
      
         "unable to execute QEMU command 'device_add': Property 'scsi-hd.drive'
          can't find value 'drive-scsi0-0-0-0'"
      
      because of assumptions that when the format=luks that libvirt would have
      provided the secret to decrypt the volume.
      
      Access to unlock the volume will thus be left to the application.
      7f7d9904
  6. 15 12月, 2016 5 次提交
    • M
      qemu: Manage /dev entry on RNG hotplug · f95c5c48
      Michal Privoznik 提交于
      When attaching a device to a domain that's using separate mount
      namespace we must maintain /dev entries in order for qemu process
      to see them.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      f95c5c48
    • M
      qemu: Manage /dev entry on chardev hotplug · f5fdf23a
      Michal Privoznik 提交于
      When attaching a device to a domain that's using separate mount
      namespace we must maintain /dev entries in order for qemu process
      to see them.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      f5fdf23a
    • M
      qemu: Manage /dev entry on hostdev hotplug · 6e574928
      Michal Privoznik 提交于
      When attaching a device to a domain that's using separate mount
      namespace we must maintain /dev entries in order for qemu process
      to see them.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      6e574928
    • M
      qemu: Manage /dev entry on disk hotplug · 81df2150
      Michal Privoznik 提交于
      When attaching a device to a domain that's using separate mount
      namespace we must maintain /dev entries in order for qemu process
      to see them.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      81df2150
    • M
      qemu: Spawn qemu under mount namespace · bb4e5296
      Michal Privoznik 提交于
      Prime time. When it comes to spawning qemu process and
      relabelling all the devices it's going to touch, there's inherent
      race with other applications in the system (e.g. udev). Instead
      of trying convincing udev to not touch libvirt managed devices,
      we can create a separate mount namespace for the qemu, and mount
      our own /dev there. Of course this puts more work onto us as we
      have to maintain /dev files on each domain start and device
      hot(un-)plug. On the other hand, this enhances security also.
      
      From technical POV, on domain startup process the parent
      (libvirtd) creates:
      
        /var/lib/libvirt/qemu/$domain.dev
        /var/lib/libvirt/qemu/$domain.devpts
      
      The child (which is going to be qemu eventually) calls unshare()
      to create new mount namespace. From now on anything that child
      does is invisible to the parent. Child then mounts tmpfs on
      $domain.dev (so that it still sees original /dev from the host)
      and creates some devices (as explained in one of the previous
      patches). The devices have to be created exactly as they are in
      the host (including perms, seclabels, ACLs, ...). After that it
      moves $domain.dev mount to /dev.
      
      What's the $domain.devpts mount there for then you ask? QEMU can
      create PTYs for some chardevs. And historically we exposed the
      host ends in our domain XML allowing users to connect to them.
      Therefore we must preserve devpts mount to be shared with the
      host's one.
      
      To make this patch as small as possible, creating of devices
      configured for domain in question is implemented in next patches.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      bb4e5296
  7. 23 11月, 2016 2 次提交
    • N
      qemu: agent: fix unsafe agent access · aaf2992d
      Nikolay Shirokovskiy 提交于
      qemuDomainObjExitAgent is unsafe.
      
      First it accesses domain object without domain lock.
      Second it uses outdated logic that goes back to commit 79533da1 of
      year 2009 when code was quite different. (unref function
      instead of unreferencing only unlocked and disposed object
      in case of last reference and leaved unlocking to the caller otherwise).
      Nowadays this logic may lead to disposing locked object
      i guess.
      
      Another problem is that the callers of qemuDomainObjEnterAgent
      use domain object again (namely priv->agent) without domain lock.
      
      This patch address these two problems.
      
      qemuDomainGetAgent is dropped as unused.
      aaf2992d
    • N
      qemu: drop write-only agentStart · 3c1c5678
      Nikolay Shirokovskiy 提交于
      3c1c5678
  8. 22 11月, 2016 1 次提交
  9. 15 11月, 2016 1 次提交
  10. 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
  11. 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
  12. 25 10月, 2016 1 次提交
  13. 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
  14. 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
  15. 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
  16. 12 10月, 2016 1 次提交
  17. 21 9月, 2016 1 次提交
  18. 20 9月, 2016 1 次提交
  19. 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
  20. 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
  21. 04 8月, 2016 2 次提交
  22. 02 8月, 2016 1 次提交
  23. 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
  24. 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
  25. 11 7月, 2016 2 次提交
  26. 02 7月, 2016 1 次提交
  27. 24 6月, 2016 2 次提交
  28. 09 6月, 2016 1 次提交