1. 27 4月, 2020 4 次提交
  2. 24 4月, 2020 6 次提交
  3. 23 4月, 2020 8 次提交
  4. 22 4月, 2020 6 次提交
  5. 21 4月, 2020 1 次提交
  6. 17 4月, 2020 1 次提交
  7. 16 4月, 2020 3 次提交
  8. 15 4月, 2020 1 次提交
  9. 13 4月, 2020 4 次提交
    • L
      qemu/conf: set HOTPLUGGABLE connect flag during PCI address set init · aa15e925
      Laine Stump 提交于
      virDomainPCIAddressBusSetModel() is called for each PCI controller
      when building an address set prior to assiging PCI addresses to
      devices.
      
      This patch adds a new argument, allowHotplug, to that function that
      can be set to false if we know for certain that a particular
      controller won't support hotplug
      
      The most interesting case is in qemuDomainPCIAddressSetCreate(), where
      the config of each existing controller is available while building the
      address set, so we can appropriately set allowHotplug = false when the
      user has "hotplug='off'" in the config of a controller that normally
      would support hotplug. In all other cases, it is set to true or false
      in accordance with the capability of the controller model.
      
      So far we aren't doing anything with this bus flag in the address set.
      Signed-off-by: NLaine Stump <laine@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      aa15e925
    • L
      conf/qemu: s/VIR_PCI_CONNECT_HOTPLUGGABLE/VIR_PCI_CONNECT_AUTOASSIGN/g · 7c98f5e3
      Laine Stump 提交于
      When the HOTPLUGGABLE flag was originally added, it was set for all
      the PCI controllers that accepted hotplugged devices, and requested
      for all devices that were auto-assigned to a controller. While we're
      still autoassigning to the same list of controllers, those controllers
      may or may not support hotplug, so let's use the flag that fits what
      we're actually doing.
      Signed-off-by: NLaine Stump <laine@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      7c98f5e3
    • L
      qemu: hook up pcie-root-port hotplug='off' option · 2d3cf603
      Laine Stump 提交于
      If a pcie-root-port or pcie-downstream-port has hotplug='off' in its
      <target> subelement, and if the qemu binary supports the hotplug=false
      option, then it will be added to the commandline for the pcie
      controller. This controller will then not allow any hotplug/unplug of
      devices while the guest is running (and the hotplug capability won't
      be advertised to the guest OS, so the guest OS also won't present
      unplugging of PCI devices as an option).
      
        <controller type='pci' model='pcie-root-port'>
          <target hotplug='off'/>
        </controller>
      
      For any PCI controllers other than pcie-downstream-port and
      pcie-root-port, of for qemu binaries that don't support the hotplug
      commandline option, an error will be logged during validation.
      Signed-off-by: NLaine Stump <laine@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      2d3cf603
    • L
      qemu: new capabilities flag pcie-root-port.hotplug · cbd4ab4c
      Laine Stump 提交于
      This caps flag is set when the qemu binary supports the option
      "hotplug" for pcie-root-port, ioh3420 (Intel pcie-root-port) and
      xio3130-downstream (Intel pcie-downstream-port). If it's available,
      it's possible to disable hotplugging/unplugging devices on a
      particular port by adding ",hotplug=off" to the qemu device
      commandline. This option first appears in qemu-5.0.0.
      Signed-off-by: NLaine Stump <laine@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      cbd4ab4c
  10. 08 4月, 2020 3 次提交
  11. 07 4月, 2020 3 次提交
    • M
      qemu: Make auto dump path generation embed driver aware · 32c754e2
      Michal Privoznik 提交于
      So far, libvirt generates the following path for automatic dumps:
      
        $autoDumpPath/$id-$shortName-$timestamp
      
      where $autoDumpPath is where libvirt stores dumps of guests (e.g.
      /var/lib/libvirt/qemu/dump), $id is domain ID and $shortName is
      shortened version of domain name. So for instance, the generated
      path may look something like this:
      
        /var/lib/libvirt/qemu/dump/1-QEMUGuest-2020-03-25-10:40:50
      
      While in case of embed driver the following path would be
      generated by default:
      
        $root/lib/libvirt/qemu/dump/1-QEMUGuest-2020-03-25-10:40:50
      
      which is not clashing with other embed drivers, we allow users to
      override the default and have all embed drivers use the same
      prefix. This can create clashing paths. Fortunately, we can reuse
      the approach for machined name generation
      (v6.1.0-178-gc9bd08ee) and include part of hash of the root in
      the generated path.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      32c754e2
    • M
      qemu: Make memory path generation embed driver aware · 1d3a9ee9
      Michal Privoznik 提交于
      So far, libvirt generates the following path for memory:
      
        $memoryBackingDir/$id-$shortName/ram-nodeN
      
      where $memoryBackingDir is the path where QEMU mmaps() memory for
      the guest (e.g. /var/lib/libvirt/qemu/ram), $id is domain ID
      and $shortName is shortened version of domain name. So for
      instance, the generated path may look something like this:
      
        /var/lib/libvirt/qemu/ram/1-QEMUGuest/ram-node0
      
      While in case of embed driver the following path would be
      generated by default:
      
        $root/lib/qemu/ram/1-QEMUGuest/ram-node0
      
      which is not clashing with other embed drivers, we allow users to
      override the default and have all embed drivers use the same
      prefix. This can create clashing paths. Fortunately, we can reuse
      the approach for machined name generation
      (v6.1.0-178-gc9bd08ee) and include part of hash of the root in
      the generated path.
      
      Note, the important change is in qemuGetMemoryBackingBasePath().
      The rest is needed to pass driver around.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      1d3a9ee9
    • M
      qemu: Make hugepages path generation embed driver aware · bf54784c
      Michal Privoznik 提交于
      So far, libvirt generates the following path for hugepages:
      
        $mnt/libvirt/qemu/$id-$shortName
      
      where $mnt is the mount point of hugetlbfs corresponding to
      hugepages of desired size (e.g. /dev/hugepages), $id is domain ID
      and $shortName is shortened version of domain name. So for
      instance, the generated path may look something like this:
      
        /dev/hugepages/libvirt/qemu/1-QEMUGuest
      
      But this won't work with embed driver really, because if there
      are two instances of embed driver, and they both want to start a
      domain with the same name and with hugepages, both drivers will
      generate the same path which is not desired. Fortunately, we can
      reuse the approach for machined name generation
      (v6.1.0-178-gc9bd08ee) and include part of hash of the root in
      the generated path.
      
      Note, the important change is in qemuGetBaseHugepagePath(). The
      rest is needed to pass driver around.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      bf54784c