1. 15 4月, 2016 10 次提交
    • L
      conf: new pci controller model pci-expander-bus · 52f3d0a4
      Laine Stump 提交于
      This is a standard PCI root bus (not a bridge) that can be added to a
      440fx-based domain. Although it uses a PCI slot, this is *not* how it
      is connected into the PCI bus hierarchy, but is only used for
      control. Each pci-expander-bus provides 32 slots (0-31) that can
      accept hotplug of standard PCI devices.
      
      The usefulness of pci-expander-bus relative to a pci-bridge is that
      the NUMA node of the bus can be specified with the <node> subelement
      of <target>. This gives guest-side visibility to the NUMA node of
      attached devices (presuming that management apps only assign a device
      to a bus that has a NUMA node number matching the node number of the
      device on the host).
      
      Each pci-expander-bus also has a "busNr" attribute. The expander-bus
      itself will take the busNr specified, and all buses that are connected
      to this bus (including the pci-bridge that is automatically added to
      any expander bus of model "pxb" (see the next commit)) will use
      busNr+1, busNr+2, etc, and the pci-root (or the expander-bus with next
      lower busNr) will use bus numbers lower than busNr.
      52f3d0a4
    • L
      qemu: add capabilities bit for device "pxb" · 5d4e2b17
      Laine Stump 提交于
      The pxb device is a PCI expander bus that can be added to any
      440fx-based machinetype. The PCI bus that is created has 32 standard
      PCI slots (hotpluggable). It can have a NUMA node number associated
      with it, as well as a bus number.
      5d4e2b17
    • L
      qemu: set PCI controller default modelName in a separate function · 1da28473
      Laine Stump 提交于
      Since every PCI controller model has to have a default model name set,
      put it in a separate function to clean up qemuDomainAssignPCIAddresses
      a bit.
      1da28473
    • L
      conf: utility function to convert PCI controller model into connect type · a0616ee8
      Laine Stump 提交于
      There are two places in qemu_domain_address.c where we have a switch
      statement to convert PCI controller models
      (VIR_DOMAIN_CONTROLLER_MODEL_PCI*) into the connection type flag that
      is matched when looking for an upstream connection for that model of
      controller (VIR_PCI_CONNECT_TYPE_*). This patch makes a utility
      function in conf/domain_addr.c to do that, so that when a new PCI
      controller is added, we only need to add the new model-->connect-type
      in a single place.
      a0616ee8
    • L
      conf/qemu: change the way VIR_PCI_CONNECT_TYPE_* flags work · d1cc4605
      Laine Stump 提交于
      The flags used to determine which devices could be plugged into which
      controllers were quite confusing, as they tried to create classes of
      connections, then put particular devices into possibly multiple
      classes, while sometimes setting multiple flags for the controllers
      themselves. The attempt to have a single flag indicate, e.g. that a
      root-port or a switch-downstream-port could connect was not only
      confusing, it was leading to a situation where it would be impossible
      to specify exactly the right combinations for a new controller.
      
      The solution is for the VIR_PCI_CONNECT_TYPE_* flags to have a 1:1
      correspondence with each type of PCI controller, plus a flag for a PCI
      endpoint device and another for a PCIe endpoint device (the only
      exception to this is that pci-bridge and pcie-expander-bus controllers
      have their upstream connection classified as
      VIR_PCI_CONNECT_TYPE_PCI_DEVICE since they can be plugged into
      *exactly* the same ports as any endpoint device).  Each device then
      has a single flag for connect type (plus the HOTPLUG flag if that
      device can e hotplugged), and each controller sets the CONNECT bits
      for all controllers that can be plugged into it, as well as for either
      type of endpoint device that can be plugged in (and the HOTPLUG flag
      if it can accept hotplugged devices).
      
      With this change, it is *slightly* easier to understand the matching
      of connections (as long as you remember that the flag for a
      device/upstream-facing connection of a controller is the same as that
      device's type, while the flags for a controller's downstream
      connections is the OR of all device types that can be plugged into
      that controller). More importantly, it will be possible to correctly
      specify what can be plugged into a pcie-switch-expander-bus, when
      support for it is added.
      d1cc4605
    • L
      conf: allow use of slot 0 in a dmi-to-pci-bridge · 0d668434
      Laine Stump 提交于
      When support for dmi-to-pci-bridge was added, it was assumed that,
      just as with the pci-root bus, slot 0 was reserved. This is not the
      case - it can be used to connect a device just like any other slot, so
      remove the restriction and update the test cases that auto-assign an
      address on a dmi-to-pci-bridge.
      0d668434
    • L
      conf: use #define instead of literal for highest slot in upstream port · 6d0902a5
      Laine Stump 提交于
      Every other maxSlot was either set to 0 or to
      VIR_PCI_ADDRESS_SLOT_LAST, but this one was for some reason set to the
      literal value 31 (which is the same as VIR_PCI_ADDRESS_SLOT_LAST).
      This makes them all consistent.
      6d0902a5
    • C
      util: Add virGettextInitialize, convert the code · e7db2278
      Cole Robinson 提交于
      Take setlocale/gettext error handling pattern from tools/virsh-*
      and use it for all standalone binaries via a new shared
      virGettextInitialize routine. The virsh* pattern differed slightly
      from other callers. All users now consistently:
      
      * Ignore setlocale errors. virsh has done this forever, presumably for
        good reason. This has been partially responsible for some bug reports:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=1312688
        https://bugzilla.redhat.com/show_bug.cgi?id=1026514
        https://bugzilla.redhat.com/show_bug.cgi?id=1016158
      
      * Report the failed function name
      * Report strerror
      e7db2278
    • C
      storage: mpath: Don't error on target_type=NULL · 8f8c0feb
      Cole Robinson 提交于
      We use device-mapper to enumerate all dm devices, and filter out
      the list of multipath devices by checking the target_type string
      name. The code however cancels all scanning if we encounter
      target_type=NULL
      
      I don't know how to reproduce that situation, but a user was hitting
      it in their setup, and inspecting the lvm2/device-mapper code shows
      many places where !target_type is explicitly ignored and processing
      continues on to the next device. So I think we should do the same
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1069317
      8f8c0feb
    • C
      qemu: command: don't overwrite watchdog dump action · a91177c8
      Cole Robinson 提交于
      The watchdog cli refactoring in 4666b762 dropped the temporary variable
      we use to convert to action=dump to action=pause for the qemu cli, and
      stored the converted value in the domain structure. Our other watchdog
      handling code then treated it as though the user requested action=pause,
      which broke action=dump handling.
      
      Revive the temporary variable to fix things.
      a91177c8
  2. 14 4月, 2016 7 次提交
  3. 13 4月, 2016 23 次提交