1. 27 4月, 2020 3 次提交
  2. 24 4月, 2020 2 次提交
  3. 23 4月, 2020 1 次提交
  4. 22 4月, 2020 1 次提交
  5. 21 4月, 2020 2 次提交
    • J
      conf: add xen hypervisor feature 'passthrough' · fadbaa23
      Jim Fehlig 提交于
      'passthrough' is Xen-Specific guest configuration option new to Xen 4.13
      that enables IOMMU mappings for a guest and hence whether it supports PCI
      passthrough. The default is disabled. See the xl.cfg(5) man page and
      xen.git commit babde47a3fe for more details.
      
      The default state of disabled prevents hotlugging PCI devices. However,
      if the guest configuration contains a PCI passthrough device at time of
      creation, libxl will automatically enable 'passthrough' and subsequent
      hotplugging of PCI devices will also be possible. It is not possible to
      unconditionally enable 'passthrough' since it would introduce a migration
      incompatibility due to guest ABI change. Instead, introduce another Xen
      hypervisor feature that can be used to enable guest PCI passthrough
      
        <features>
          <xen>
            <passthrough state='on'/>
          </xen>
        </features>
      
      To allow finer control over how IOMMU maps to guest P2M table, the
      passthrough element also supports a 'mode' attribute with values
      restricted to snyc_pt and share_pt, similar to xl.cfg(5) 'passthrough'
      setting .
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      fadbaa23
    • M
      conf: add xen specific feature: e820_host · b7d6648d
      Marek Marczykowski-Górecki 提交于
      e820_host is a Xen-specific option, only available for PV domains, that
      provides the domain a virtual e820 memory map based on the host one. It
      is enabled with a new Xen hypervisor feature, e.g.
      
        <features>
          <xen>
            <e820_host state='on'/>
          </xen>
        </features>
      
      e820_host is required when using PCI passthrough and is generally
      considered safe for any PV kernel. e820_host is silently ignored if set
      in HVM domain configuration. See xl.cfg(5) man page in the Xen
      documentation for more details.
      Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
      Reviewed-by: NJim Fehlig <jfehlig@suse.com>
      b7d6648d
  6. 16 4月, 2020 1 次提交
  7. 15 4月, 2020 1 次提交
  8. 13 4月, 2020 7 次提交
    • 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
      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
  9. 10 4月, 2020 1 次提交
    • J
      conf: Add a new xenbus controller option for event channels · 8e669b38
      Jim Fehlig 提交于
      Event channels are like PV interrupts and in conjuction with grant frames
      form a data transfer mechanism for PV drivers. They are also used for
      inter-processor interrupts. Guests with a large number of vcpus and/or
      many PV devices many need to increase the maximum default value of 1023.
      For this reason the native Xen config format supports the
      'max_event_channels' setting. See xl.cfg(5) man page for more details.
      
      Similar to the existing maxGrantFrames option, add a new xenbus controller
      option 'maxEventChannels', allowing to adjust the maximum value via libvirt.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      8e669b38
  10. 08 4月, 2020 1 次提交
  11. 07 4月, 2020 1 次提交
  12. 06 4月, 2020 1 次提交
  13. 03 4月, 2020 1 次提交
  14. 30 3月, 2020 1 次提交
  15. 25 3月, 2020 7 次提交
  16. 24 3月, 2020 4 次提交
  17. 23 3月, 2020 1 次提交
  18. 18 3月, 2020 2 次提交
  19. 17 3月, 2020 1 次提交
    • D
      nodedev: fix race in API usage vs initial device enumeration · 008abeb0
      Daniel P. Berrangé 提交于
      During startup the udev node device driver impl uses a background thread
      to populate the list of devices to avoid blocking the daemon startup
      entirely. There is no synchronization to the public APIs, so it is
      possible for an application to start calling APIs before the device
      initialization is complete.
      
      This was not a problem in the old approach where libvirtd was started
      on boot, as initialization would easily complete before any APIs were
      called.
      
      With the use of socket activation, however, APIs are invoked from the
      very moment the daemon starts. This is easily seen by doing a
      
        'virsh -c nodedev:///system list'
      
      the first time it runs it will only show one or two devices. The second
      time it runs it will show all devices. The solution is to introduce a
      flag and condition variable for APIs to synchronize against before
      returning any data.
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      008abeb0
  20. 16 3月, 2020 1 次提交