1. 14 4月, 2020 7 次提交
  2. 13 4月, 2020 10 次提交
    • L
      conf: during PCI hotplug, require that the controller support hotplug · 7118bdee
      Laine Stump 提交于
      Before this patch we would simply rely on QEMU failing to attach the
      device. Since we have a flag in the address set telling us which
      controllers support hotplug, we can fail the operation sooner.
      
      This also assures that when hotplugging with no provided PCI address,
      that we skip any controllers with hotplug='off', and attempt to assign
      the device to a controller that not only supports hotplug, but also
      has it enabled.
      Signed-off-by: NLaine Stump <laine@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      7118bdee
    • L
      conf: check HOTPLUGGABLE connect flag when validating a PCI address · a283189f
      Laine Stump 提交于
      The HOTPLUGGABLE flag is set for appropriates buses in a PCI address
      set, and thnis patch updates virDomainPCIAddressFlagsCompatible() to
      check the HOTPLUGGABLE flag when searching for a suitable bus/slot for
      a device. No devices request HOTPLUGGABLE though (yet), so there is no
      observable effect.
      Signed-off-by: NLaine Stump <laine@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      a283189f
    • 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: simplify logic when checking for AUTOASSIGN PCI addresses · fcdf87d3
      Laine Stump 提交于
      Old behavior: If the address was manually provided by config, copy
      device AUTOASSIGN flag into the bus flag, and then later on in the
      function *always* check for a match of the flags (which will always
      match if the address came from config, since we just copied it).
      
      New behavior: Don't mess with the bus flags - just directly check if
      the AUTOASSIGN flag matches in bus and dev, but only make the check if
      the address didn't come from config (i.e. it was auto-assigned by
      libvirt).
      Signed-off-by: NLaine Stump <laine@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      fcdf87d3
    • 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
      conf: add new PCI_CONNECT flag AUTOASSIGN · c296a846
      Laine Stump 提交于
      This new flag will be set for any controller that we decide can have
      devices assigned to it automatically during PCI device assignment. In
      the past PCI_CONNECT_TYPE_HOTPLUGGABLE was used for this purpose, but
      that is overloading that flag, and no longer technically correct; what
      we *really* want is to auto-assign devices to any pcie-root-port or
      pcie-switch-downstream-port regardless of whether or not that
      controller happens to have hotplug enabled.
      
      This patch just adds the flag, but doesn't use it at all. Note that
      the numbering of all the other flags was changed in order to insert
      the new flag near the beginning of the list; that doesn't cause any
      problem because the connect flags aren't stored anywhere between runs
      of libvirtd.
      Signed-off-by: NLaine Stump <laine@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      c296a846
    • L
      docs: mention hotplug='off' in news.xml · 389811d5
      Laine Stump 提交于
      Signed-off-by: NLaine Stump <laine@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      389811d5
    • 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
      conf: new attribute "hotplug" for pci controllers · 78f4d5e6
      Laine Stump 提交于
      a <controller type='pci'...> element can now have a "hotplug"
      attribute in the <target> subelement. This is intended to control
      whether or not the slot(s) of the controller support
      hotplugging/unplugging a device:
      
         <controller type='pci' model='pcie-root-port'>
           <target hotplug='off'/>
         </controller>
      
      The default value of hotplug is "on".
      
      Since support for configuring such an option is hypervisor-dependent
      (and will vary among different types of PCI controllers even on a
      single hypervisor), no validation is done in this patch - that
      validation will be done in the patch that wires support for the
      setting into the hypervisor.
      Signed-off-by: NLaine Stump <laine@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      78f4d5e6
    • 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
  3. 10 4月, 2020 5 次提交
  4. 09 4月, 2020 7 次提交
  5. 08 4月, 2020 11 次提交