1. 26 5月, 2016 1 次提交
    • L
      conf: permit auto-assignment of controller indexes · 4d100c7a
      Laine Stump 提交于
      Hand-entering indexes for 20 PCI controllers is not as tedious as
      manually determining and entering their PCI addresses, but it's still
      annoying, and the algorithm for determining the proper index is
      incredibly simple (in all cases except one) - just pick the lowest
      unused index.
      
      The one exception is USB2 controllers because multiple controllers in
      the same group have the same index. For these we look to see if 1) the
      most recently added USB controller is also a USB2 controller, and 2)
      the group *that* controller belongs to doesn't yet have a controller
      of the exact model we're just now adding - if both are true, the new
      controller gets the same index, but in all other cases we just assign
      the lowest unused index.
      
      With this patch in place and combined with the automatic PCI address
      assignment, we can define a PCIe switch with several ports like this:
      
        <controller type='pci' model='pcie-root-port'/>
        <controller type='pci' model='pcie-switch-upstream-port'/>
        <controller type='pci' model='pcie-switch-downstream-port'/>
        <controller type='pci' model='pcie-switch-downstream-port'/>
        <controller type='pci' model='pcie-switch-downstream-port'/>
        <controller type='pci' model='pcie-switch-downstream-port'/>
        <controller type='pci' model='pcie-switch-downstream-port'/>
        ...
      
      These will each get a unique index, and PCI addresses that connect
      them together appropriately with no pesky numbers required.
      4d100c7a
  2. 25 5月, 2016 1 次提交
  3. 23 5月, 2016 2 次提交
    • J
      Deprecate QEMU_CAPS_DEVICE · 5572cd7f
      Ján Tomko 提交于
      We support qemu version 0.12.0+, which has it.
      5572cd7f
    • J
      tests: remove disk-drive-fat test · 1e463880
      Ján Tomko 提交于
      This test requests a read-only virtual FAT drive on the IDE bus.
      Read-only IDE drives are unsupported, but libvirt only displays
      the error if it has the QEMU_CAPS_DRIVE_READONLY capability.
      Read-write FAT drives are also unsupported.
      1e463880
  4. 21 5月, 2016 1 次提交
    • L
      qemu: auto-assign addresses when <address type='pci'/> is specified · c026f8f1
      Laine Stump 提交于
      Rather than only assigning a PCI address when no address is given at
      all, also do it when the config says that the address type is 'pci',
      but it gives no address (virDeviceInfoPCIAddressWanted()).
      
      There are also several places after parsing but prior to address
      assignment where code previously expected that any info with address
      type='pci' would have a *valid* PCI address, which isn't always the
      case - now we check not only for type='pci', but also for a valid
      address (virDeviceInfoPCIAddressPresent()).
      
      The test case added in this patch was directly copied from Cole's patch titled:
      
          qemu: Wire up address type=pci auto_allocate
      c026f8f1
  5. 20 5月, 2016 2 次提交
  6. 19 5月, 2016 1 次提交
    • C
      qemu: Assign device addresses in PostParse · 5d7314bb
      Cole Robinson 提交于
      This wires up qemuDomainAssignAddresses into the new
      virDomainDefAssignAddressesCallback, so it's always triggered
      via virDomainDefPostParse. We are essentially doing this already
      with open coded calls sprinkled about.
      
      qemu argv parse output changes slightly since previously it wasn't
      hitting qemuDomainAssignAddresses.
      5d7314bb
  7. 18 5月, 2016 2 次提交
    • A
      tests: Try different usable GIC versions · f6ececa6
      Andrea Bolognani 提交于
      The only case where the hardware capabilities influence the result
      is when no <gic/> element was provided.
      
      The test programs now ensure both that the correct GIC version is
      picked in that case, and that hardware capabilities are not taken
      into account when the user has already picked a GIC version.
      f6ececa6
    • A
      tests: Prepare to have different usable GIC versions · 63bc91ee
      Andrea Bolognani 提交于
      Now that we choose the GIC version based on hardware features when
      no <gic/> element has been provided, we need a way to fake the GIC
      capabilities of the host.
      
      Update the qemuxml2argv and qemuxml2xml tests to allow this.
      63bc91ee
  8. 04 5月, 2016 1 次提交
    • J
      conf: Add support for virtio-scsi iothreads · e0d0e530
      John Ferlan 提交于
      Add the ability to add an 'iothread' to the controller which will be how
      virtio-scsi-pci and virtio-scsi-ccw iothreads have been implemented in qemu.
      
      Describe the new functionality and add tests to parse/validate that the
      new attribute can be added.
      e0d0e530
  9. 02 5月, 2016 1 次提交
  10. 28 4月, 2016 1 次提交
    • M
      qemu: Regenerate VNC socket paths · 55320c23
      Martin Kletzander 提交于
      Similarly to what commit 71408079 did with some internal paths,
      clear vnc socket paths that were generated by us.  Having such path in
      the definition can cause trouble when restoring the domain.  The path is
      generated to the per-domain directory that contains the domain ID.
      However, that ID will be different upon restoration, so qemu won't be
      able to create that socket because the directory will not be prepared.
      
      To be able to migrate to older libvirt, skip formatting the socket path
      in migratable XML if it was autogenerated.  And mark it as autogenerated
      if it already exists and we're parsing live XML.
      
      Best viewed with '-C'.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1326270Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      55320c23
  11. 15 4月, 2016 3 次提交
    • L
      conf: new pci controller model pcie-expander-bus · bc07251f
      Laine Stump 提交于
      This controller provides a single PCIe port on a new root. It is
      similar to pci-expander-bus, intended to provide a bus that can be
      associated with a guest-identifiable NUMA node, but is for
      machinetypes with PCIe rather than PCI (e.g. q35-based machinetypes).
      
      Aside from PCIe vs. PCI, the other main difference is that a
      pci-expander-bus has a companion pci-bridge that is automatically
      attached along with it, but pcie-expander-bus has only a single port,
      and that port will only connect to a pcie-root-port, or to a
      pcie-switch-upstream-port. In order for the bus to be of any use in
      the guest, it must have either a pcie-root-port or a
      pcie-switch-upstream-port attached (and one or more
      pcie-switch-downstream-ports attached to the
      pcie-switch-upstream-port).
      bc07251f
    • 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
    • C
      tests: Enable failure testing with CompareDomXML2XML · c493d216
      Cole Robinson 提交于
      This allows tests to check for specific failure scenarios
      c493d216
  12. 13 4月, 2016 1 次提交
    • J
      tests: clean up includes · f36c9f7b
      Ján Tomko 提交于
      After removing qemuBuildCommandLineCallbacks, testutilsqemu.h does not
      need to include qemu_command.h.
      
      Include just qemu_conf.h here and qemu_domain_address.h in files that
      need it.
      f36c9f7b
  13. 11 4月, 2016 1 次提交
  14. 01 3月, 2016 2 次提交
    • M
      qemu: add spice opengl support · 937ebba0
      Marc-André Lureau 提交于
      Add Spice graphics gl attribute. qemu 2.6 should have -spice gl=on argument to
      enable opengl rendering context (patches on the ML). This is necessary to
      actually enable virgl rendering.
      
      Add a qemuxml2argv test for virtio-gpu + spice with virgl.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      937ebba0
    • M
      qemu: Shorten per-domain directory names · a89f05ba
      Martin Kletzander 提交于
      Per-domain directories were introduced in order to be able to
      completely separate security labels for each domain (commit
      f1f68ca3).  However when the domain
      name is long (let's say a ridiculous 110 characters), we cannot
      connect to the monitor socket because on length of UNIX socket address
      is limited.  In order to get around this, let's shorten it in similar
      fashion and in order to avoid conflicts, throw in an ID there as well.
      Also save that into the status XML and load the old status XMLs
      properly (to clean up after older domains).  That way we can change it
      in the future.
      
      The shortening can be seen in qemuxml2argv tests, for example in the
      hugepages-pages2 case.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      a89f05ba
  15. 26 2月, 2016 1 次提交
  16. 22 2月, 2016 1 次提交
  17. 16 2月, 2016 2 次提交
    • A
      tests: Add more GIC test cases · 998a936c
      Andrea Bolognani 提交于
      Test all kinds of scenarios, including guests asking for GIC but
      failing to specify a version, guests specifying an invalid version
      and guests trying to use GIC with non-virt or even non-ARM machines.
      998a936c
    • A
      tests: Reorganize and simplify GIC test cases · 161a3418
      Andrea Bolognani 提交于
      Unify the naming to prepare for new test cases that will be added
      later on.
      
      Convert a couple of output XML files for the qemuxml2xml test to
      symlinks while at it, since they were identical to the corresponding
      input XML files anyways.
      
      Moreover, since we're only interested in testing GIC support here,
      simplify XML files by getting rid of the unrelevant bits.
      161a3418
  18. 10 2月, 2016 6 次提交
    • C
      tests: qemu: More aarch64 virtio and pci tests · 5a1ccaeb
      Cole Robinson 提交于
      Clarify the point of some of the test cases by renaming them. Add more
      xml2xml tests.
      5a1ccaeb
    • C
      tests: qemuxml2xml: assign device addresses · c1c4d0d5
      Cole Robinson 提交于
      We use the PreFormat callback for this. Many test cases need to be extended
      to pass in proper qemuCaps flags so AssignAddresses doesn't throw errors.
      
      One test case (pcie-root-port-too-many) is dropped, since it was meant
      only for checking an error condition in qemuxml2argv, and one we add in
      AssignAddresses it errors here too.
      
      Long term I think AssignAddresses should be handled in qemu's PostParse
      callback, but that's not entirely straightforward. Handling it here
      means we can get the test suite churn over with.
      c1c4d0d5
    • C
      tests: utils: Add PreFormat callback for CompareXML2XML helper · 8e0fd243
      Cole Robinson 提交于
      This allows individual driver tests to hook in their own code before
      the def is formatted and compared.
      
      We will eventually use this in the qemuxml2xml
      8e0fd243
    • C
      tests: qemuxml2xml: specify qemuCaps in test cases · 129c3532
      Cole Robinson 提交于
      Similar to how we do it for qemuxml2argvtest. This will be used in future
      patches.
      129c3532
    • C
      tests: Unconditionally enable QEMU_CAPS_DEVICE · 51045df0
      Cole Robinson 提交于
      QEMU_CAPS_DEVICE is always enabled for qemu binaries we support.
      Sync qemuxml2* to match, and regenerate all test output.
      51045df0
    • C
      tests: qemuxml2argv: remove some QEMU_CAPS_DEVICE problem cases · e9394d69
      Cole Robinson 提交于
      When we unconditionally enable QEMU_CAPS_DEVICE, these tests need
      some massaging, so do it ahead of time to not mix it in with the
      big test refresh.
      
      - minimal-s390 is not a real world working config, so drop it
      - disk-usb was testing for an old code path that will be removed.
        instead use it to test lack of USB disk support, and rename it
        to disk-usb-nosupport. Switch xml2xml to use disk-usb-device for
        input.
      - cputune-numatune was needlessly using q35, switch it to an older
        machine type
      e9394d69
  19. 09 2月, 2016 1 次提交
    • C
      tests: qemuxml2xml: Always use different output file · d093d623
      Cole Robinson 提交于
      Most qemuxml2xml tests expect that the input XML is unchanged after
      parsing. This is unlike 99% of new qemu configs in the wild, which after
      initial parsing end up with stable PCI device addresses. The xml2xml bit
      doesn't currently hit that code path though, so most XML testing indeed
      does not change.
      
      Future patches will add that PCI address bits, which means most test cases
      will have different output. So let's do away with the hardcoded same vs
      different test split, and always track a separate output file. Tests can
      still have same input and output, it just necessitates 2 separate XML files.
      d093d623
  20. 05 2月, 2016 1 次提交
  21. 27 1月, 2016 1 次提交
  22. 12 1月, 2016 1 次提交
    • L
      qemu: prefer 00:1D.x and 00:1A.x for USB2 controllers on Q35 · 163338ec
      Laine Stump 提交于
      The real Q35 machine puts the first USB controller set (EHCI+(UHCIx4))
      on bus 0 slot 0x1D, and the 2nd USB controller set on bus 0 slot 0x1A,
      so let's attempt to make the virtual machine match that for
      controllers with auto-assigned addresses when possible.
      
      Three test cases were added to assure that the proper addresses are
      assigned - one with a single set of unaddressed USB controllers, one
      with 3 (to grab both preferred slots plus one more), and one with the
      order of the controller definitions reordered, to assure that the
      auto-assignment isn't mixed up by order.
      163338ec
  23. 09 1月, 2016 4 次提交
  24. 08 1月, 2016 1 次提交
  25. 30 11月, 2015 1 次提交