1. 25 11月, 2016 1 次提交
  2. 22 11月, 2016 1 次提交
  3. 16 11月, 2016 1 次提交
  4. 15 11月, 2016 5 次提交
    • J
      cpu: Avoid adding <vendor> to custom CPUs · 98b7c37d
      Jiri Denemark 提交于
      Guest CPU definitions with mode='custom' and missing <vendor> are
      expected to run on a host CPU from any vendor as long as the required
      CPU model can be used as a guest CPU on the host. But even though no CPU
      vendor was explicitly requested we would sometimes force it due to a bug
      in virCPUUpdate and virCPUTranslate.
      
      The bug would effectively forbid cross vendor migrations even if they
      were previously working just fine.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      98b7c37d
    • L
      qemu: auto-add pcie-root-port/dmi-to-pci-bridge controllers as needed · 0702f48e
      Laine Stump 提交于
      Previously libvirt would only add pci-bridge devices automatically
      when an address was requested for a device that required a legacy PCI
      slot and none was available. This patch expands that support to
      dmi-to-pci-bridge (which is needed in order to add a pci-bridge on a
      machine with a pcie-root), and pcie-root-port (which is needed to add
      a hotpluggable PCIe device). It does *not* automatically add
      pcie-switch-upstream-ports or pcie-switch-downstream-ports (and
      currently there are no plans for that).
      
      Given the existing code to auto-add pci-bridge devices, automatically
      adding pcie-root-ports is fairly straightforward. The
      dmi-to-pci-bridge support is a bit tricky though, for a few reasons:
      
      1) Although the only reason to add a dmi-to-pci-bridge is so that
         there is a reasonable place to plug in a pci-bridge controller,
         most of the time it's not the presence of a pci-bridge *in the
         config* that triggers the requirement to add a dmi-to-pci-bridge.
         Rather, it is the presence of a legacy-PCI device in the config,
         which triggers auto-add of a pci-bridge, which triggers auto-add of
         a dmi-to-pci-bridge (this is handled in
         virDomainPCIAddressSetGrow() - if there's a request to add a
         pci-bridge we'll check if there is a suitable bus to plug it into;
         if not, we first add a dmi-to-pci-bridge).
      
      2) Once there is already a single dmi-to-pci-bridge on the system,
         there won't be a need for any more, even if it's full, as long as
         there is a pci-bridge with an open slot - you can also plug
         pci-bridges into existing pci-bridges. So we have to make sure we
         don't add a dmi-to-pci-bridge unless there aren't any
         dmi-to-pci-bridges *or* any pci-bridges.
      
      3) Although it is strongly discouraged, it is legal for a pci-bridge
         to be directly plugged into pcie-root, and we don't want to
         auto-add a dmi-to-pci-bridge if there is already a pci-bridge
         that's been forced directly into pcie-root.
      
      Although libvirt will now automatically create a dmi-to-pci-bridge
      when it's needed, the code still remains for now that forces a
      dmi-to-pci-bridge on all domains with pcie-root (in
      qemuDomainDefAddDefaultDevices()). That will be removed in a future
      patch.
      
      For now, the pcie-root-ports are added one to a slot, which is a bit
      wasteful and means it will fail after 31 total PCIe devices (30 if
      there are also some PCI devices), but helps keep the changeset down
      for this patch. A future patch will have 8 pcie-root-ports sharing the
      functions on a single slot.
      0702f48e
    • L
      qemu: set pciConnectFlags to 0 instead of PCI|HOTPLUGGABLE if device isn't PCI · b27375a9
      Laine Stump 提交于
      This patch cleans up the connect flags for certain types/models of
      devices that aren't PCI to return 0. In the future that may be used as
      an indicator to the caller about whether or not a device needs a PCI
      address. For now it's just ignored, except for in
      virDomainPCIAddressEnsureAddr() - called during device hotplug - (and
      in some cases actually needs to be re-set to PCI|HOTPLUGGABLE just in
      case someone (in some old config) has manually set a PCI address for a
      device that isn't PCI.
      b27375a9
    • L
      qemu: set/use proper pciConnectFlags during hotplug · abb7a4bd
      Laine Stump 提交于
      Before now, all the qemu hotplug functions assumed that all devices to
      be hotplugged were legacy PCI endpoint devices
      (VIR_PCI_CONNECT_TYPE_PCI_DEVICE). This worked out "okay", because all
      devices *are* legacy PCI endpoint devices on x86/440fx machinetypes,
      and hotplug didn't work properly on machinetypes using PCIe anyway
      (hotplugging onto a legacy PCI slot doesn't work, and until commit
      b87703cf any attempt to manually specify a PCIe address for a
      hotplugged device would be erroneously rejected).
      
      This patch makes all qemu hotplug operations honor the pciConnectFlags
      set by the single all-knowing function
      qemuDomainDeviceCalculatePCIConnectFlags(). This is done in 3 steps,
      but in a single commit since we would have to touch the other points
      at each step anyway:
      
      1) add a flags argument to the hypervisor-agnostic
      virDomainPCIAddressEnsureAddr() (previously it hardcoded
      ..._PCI_DEVICE)
      
      2) add a new qemu-specific function qemuDomainEnsurePCIAddress() which
      gets the correct pciConnectFlags for the device from
      qemuDomainDeviceConnectFlags(), then calls
      virDomainPCIAddressEnsureAddr().
      
      3) in qemu_hotplug.c replace all calls to
      virDomainPCIAddressEnsureAddr() with calls to
      qemuDomainEnsurePCIAddress()
      
      So in effect, we're putting a "shim" on top of all calls to
      virDomainPCIAddressEnsureAddr() that sets the right pciConnectFlags.
      abb7a4bd
    • L
      qemu: new functions to calculate/set device pciConnectFlags · bd776c2b
      Laine Stump 提交于
      The lowest level function of this trio
      (qemuDomainDeviceCalculatePCIConnectFlags()) aims to be the single
      authority for the virDomainPCIConnectFlags to use for any given device
      using a particular arch/machinetype/qemu-binary.
      
      qemuDomainFillDevicePCIConnectFlags() sets info->pciConnectFlags in a
      single device (unless it has no virDomainDeviceInfo, in which case
      it's a NOP).
      
      qemuDomainFillAllPCIConnectFlags() sets info->pciConnectFlags in all
      devices that have a virDomainDeviceInfo
      
      The latter two functions aren't called anywhere yet. This commit is
      just making them available. Later patches will replace all the current
      hodge-podge of flag settings with calls to this single authority.
      bd776c2b
  5. 12 11月, 2016 1 次提交
  6. 11 11月, 2016 1 次提交
  7. 02 11月, 2016 2 次提交
  8. 27 10月, 2016 3 次提交
  9. 26 10月, 2016 2 次提交
    • J
      conf: Add support for blkiotune "_length" options · 8dcf3559
      John Ferlan 提交于
      Modify _virDomainBlockIoTuneInfo and rng schema to support the _length
      options for bps/iops throttling values. Document the new values.
      8dcf3559
    • J
      qemu: Add length for bps/iops throttling parameters to driver · 223438a2
      John Ferlan 提交于
      Add support for a duration/length for the bps/iops and friends.
      
      Modify the API in order to add the "blkdeviotune." specific definitions
      for the iotune throttling duration/length options
      
          total_bytes_sec_max_length
          write_bytes_sec_max_length
          read_bytes_sec_max_length
          total_iops_sec_max_length
          write_iops_sec_max_length
          read_iops_sec_max_length
      223438a2
  10. 25 10月, 2016 2 次提交
    • L
      conf: make virDomainPCIAddressGetNextSlot() a local static function · 696929e6
      Laine Stump 提交于
      This function is no longer needed outside of domain_addr.c.
      696929e6
    • L
      conf: new function virDomainPCIAddressReserveNextAddr() · 848e7ff2
      Laine Stump 提交于
      There is an existing virDomainPCIAddressReserveNextSlot() which will
      reserve all functions of the next available PCI slot. One place in the
      qemu PCI address assignment code requires reserving a *single*
      function of the next available PCI slot. This patch modifies and
      renames virDomainPCIAddressReserveNextSlot() so that it can fulfill
      both the original purpose and the need to reserve a single function.
      
      (This is being done so that the abovementioned code in qemu can have
      its "kind of open coded" solution replaced with a call to this new
      function).
      848e7ff2
  11. 24 10月, 2016 8 次提交
  12. 22 10月, 2016 3 次提交
  13. 20 10月, 2016 2 次提交
  14. 17 10月, 2016 1 次提交
    • A
      conf: Explain some code in more detail · 61e10143
      Andrea Bolognani 提交于
      The code is entirely correct, but it still managed to trip me
      up when I first ran into it because I did not realize right away
      that VIR_PCI_CONNECT_TYPES_ENDPOINT was not a single flag, but
      rather a mask including both VIR_PCI_CONNECT_TYPE_PCI_DEVICE and
      VIR_PCI_CONNECT_TYPE_PCIE_DEVICE.
      
      In order to save the next distracted traveler in PCI Address Land
      some time, document this fact with a comment. Add a test case for
      the behavior as well.
      61e10143
  15. 15 10月, 2016 1 次提交
    • L
      conf: restrict what type of buses will accept a pci-bridge · 538220c3
      Laine Stump 提交于
      A pci-bridge has *almost* the same rules as a legacy PCI endpoint
      device for where it can be automatically connected, and until now both
      had been considered identical. There is one pairing that is okay when
      specifically requested by the user (i.e. manual assignment), but we
      want to avoid it when auto-assigning addresses - plugging a pci-bridge
      directly into pcie-root (it is cleaner to plug in a dmi-to-pci-bridge,
      then plug the pci-bridge into that).
      
      In order to allow that difference, this patch makes a separate
      CONNECT_TYPE for pci-bridge, and uses it to restrict auto-assigned
      addresses for pci-bridges to be only on pci-root, pci-expander-bus,
      dmi-to-pci-bridge, or on another pci-bridge.
      
      NB: As with other discouraged-but-seem-to-work configurations
      (e.g. plugging a legacy PCI device into a pcie-root-port) if someone
      *really* wants to, they can still force a pci-bridge to be plugged
      into pcie-root (by manually specifying its PCI address.)
      538220c3
  16. 14 10月, 2016 3 次提交
  17. 12 10月, 2016 3 次提交