1. 14 6月, 2016 1 次提交
  2. 09 6月, 2016 4 次提交
  3. 08 6月, 2016 5 次提交
  4. 07 6月, 2016 2 次提交
  5. 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
  6. 25 5月, 2016 1 次提交
  7. 24 5月, 2016 1 次提交
  8. 23 5月, 2016 5 次提交
  9. 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
  10. 20 5月, 2016 3 次提交
    • J
      qemu: Utilize qemu secret objects for RBD auth/secret · a1344f70
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1182074
      
      If they're available and we need to pass secrets to qemu, then use the
      qemu domain secret object in order to pass the secrets for RBD volumes
      instead of passing the base64 encoded secret on the command line.
      
      The goal is to make AES secrets the default and have no user interaction
      required in order to allow using the AES mechanism. If the mechanism
      is not available, then fall back to the current plain mechanism using
      a base64 encoded secret.
      
      New APIs:
      
      qemu_domain.c:
        qemuDomainGetSecretAESAlias:
          Generate/return the secret object alias for an AES Secret Info type.
          This will be called from qemuDomainSecretAESSetup.
      
        qemuDomainSecretAESSetup: (private)
          This API handles the details of the generation of the AES secret
          and saves the pieces that need to be passed to qemu in order for
          the secret to be decrypted. The encrypted secret based upon the
          domain master key, an initialization vector (16 byte random value),
          and the stored secret. Finally, the requirement from qemu is the IV
          and encrypted secret are to be base64 encoded.
      
      qemu_command.c:
        qemuBuildSecretInfoProps: (private)
          Generate/return a JSON properties object for the AES secret to
          be used by both the command building and eventually the hotplug
          code in order to add the secret object. Code was designed so that
          in the future perhaps hotplug could use it if it made sense.
      
        qemuBuildObjectSecretCommandLine (private)
          Generate and add to the command line the -object secret for the
          secret. This will be required for the subsequent RBD reference
          to the object.
      
        qemuBuildDiskSecinfoCommandLine (private)
          Handle adding the AES secret object.
      
      Adjustments:
      
      qemu_domain.c:
        The qemuDomainSecretSetup was altered to call either the AES or Plain
        Setup functions based upon whether AES secrets are possible (we have
        the encryption API) or not, we have secrets, and of course if the
        protocol source is RBD.
      
      qemu_command.c:
        Adjust the qemuBuildRBDSecinfoURI API's in order to generate the
        specific command options for an AES secret, such as:
      
          -object secret,id=$alias,keyid=$masterKey,data=$base64encodedencrypted,
                  format=base64
          -drive file=rbd:pool/image:id=myname:auth_supported=cephx\;none:\
                 mon_host=mon1.example.org\:6321,password-secret=$alias,...
      
        where the 'id=' value is the secret object alias generated by
        concatenating the disk alias and "-aesKey0". The 'keyid= $masterKey'
        is the master key shared with qemu, and the -drive syntax will
        reference that alias as the 'password-secret'. For the -drive
        syntax, the 'id=myname' is kept to define the username, while the
        'key=$base64 encoded secret' is removed.
      
        While according to the syntax described for qemu commit '60390a21'
        or as seen in the email archive:
      
          https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg04083.html
      
        it is possible to pass a plaintext password via a file, the qemu
        commit 'ac1d8878' describes the more feature rich 'keyid=' option
        based upon the shared masterKey.
      
      Add tests for checking/comparing output.
      
      NB: For hotplug, since the hotplug code doesn't add command line
          arguments, passing the encoded secret directly to the monitor
          will suffice.
      a1344f70
    • P
      tests: cleanup vnc auto socket test · 2faa1356
      Pavel Hrdina 提交于
      Commit 55320c23 introduced a new test for VNC to test if
      vnc_auto_unix_socket is set in qemu.conf, but forget to enable it in
      qemuxml2argvtest.c.
      
      This patch also moves the code in qemuxml2xmltest.c next to other VNC
      tests and refactor the test so we also check the case for parsing active
      XML.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      2faa1356
    • J
      Remove DISK_BUS_XEN support from qemuBuildDiskDriveCommandLine · 936b8652
      Ján Tomko 提交于
      We have stopped supporting Xenner some time ago.
      936b8652
  11. 19 5月, 2016 2 次提交
    • C
      qemu: address: Remove QEMU_CAPS_DEVICE usage · 20a0fa8e
      Cole Robinson 提交于
      All qemu versions we support have QEMU_CAPS_DEVICE, so checking
      for it is redundant. Remove the usage.
      
      The code diff isn't clear, but all that code is just inindented
      with no other change.
      
      Test cases that hit qemuDomainAssignAddresses but don't have
      infrastructure for specifying qemuCaps values see lots of
      churn, since now PCI addresses are in the XML output.
      20a0fa8e
    • 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
  12. 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
  13. 17 5月, 2016 3 次提交
    • A
      qemu: Drop QEMU_CAPS_VIRTIO_BLK_SG_IO · 0e8a72a5
      Andrea Bolognani 提交于
      The only QEMU versions that don't have such capability are <0.11,
      which we no longer support anyway
      0e8a72a5
    • A
      qemu: Drop QEMU_CAPS_CPU_HOST · 859743c2
      Andrea Bolognani 提交于
      The only QEMU versions that don't have such capability are <0.11,
      which we no longer support anyway
      859743c2
    • A
      qemu: Drop QEMU_CAPS_PCI_ROMBAR · 8531b85b
      Andrea Bolognani 提交于
      The only QEMU versions that don't have such capability are <0.12,
      which we no longer support anyway.
      
      Additionally, this solves the issue of some QEMU binaries being
      reported as not having such capability just because they lacked
      the {kvm-}pci-assign QMP object.
      8531b85b
  14. 16 5月, 2016 3 次提交
  15. 11 5月, 2016 1 次提交
    • L
      conf: log error when incorrect PCI root controller is added to domain · e5aecc2f
      Laine Stump 提交于
      libvirt may automatically add a pci-root or pcie-root controller to a
      domain, depending on the arch/machinetype, and it hopefully always
      makes the right decision about which to add (since in all cases these
      controllers are an implicit part of the virtual machine).
      
      But it's always possible that someone will create a config that
      explicitly supplies the wrong type of PCI controller for the selected
      machinetype. In the past that would lead to an error later when
      libvirt was trying to assign addresses to other devices, for example:
      
        XML error: PCI bus is not compatible with the device at
        0000:00:02.0. Device requires a PCI Express slot, which is not
        provided by bus 0000:00
      
      (that's the error message that appears if you replace the pcie-root
      controller in a Q35 domain with a pci-root controller).
      
      This patch adds a check at the same place that the implicit
      controllers are added (to ensure that the same logic is used to check
      which type of pci root is correct). If a pci controller with index='0'
      is already present, we verify that it is of the model that we would
      have otherwise added automatically; if not, an error is logged:
      
        The PCI controller with index='0' must be " model='pcie-root' for
        this machine type, " but model='pci-root' was found instead.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1004602
      e5aecc2f
  16. 04 5月, 2016 1 次提交
  17. 03 5月, 2016 1 次提交
  18. 02 5月, 2016 1 次提交
  19. 15 4月, 2016 2 次提交
    • L
      qemu: support new pci controller model "pcie-expander-bus" · 8b62c65d
      Laine Stump 提交于
      This is backed by the qemu device pxb-pcie, which will be available in
      qemu 2.6.0.
      
      As with pci-expander-bus (which uses qemu's pxb device), the busNr
      attribute and <node> subelement of <target> are used to set the bus_nr
      and numa_node options.
      
      During post-parse we validate that the domain's machinetype is
      q35-based (since the device shows up for 440fx-based machinetypes, but
      is unusable), as well as checking that <node> specifies a node that is
      actually configured on the guest.
      8b62c65d
    • L
      qemu: support new pci controller model "pci-expander-bus" · 400b2976
      Laine Stump 提交于
      This is backed by the qemu device "pxb".
      
      The pxb device always includes a pci-bridge that is at the bus number
      of the pxb + 1.
      
      busNr and <node> from the <target> subelement are used to set the
      bus_nr and numa_node options for pxb.
      
      During post-parse we validate that the domain's machinetype is
      440fx-based (since the pxb device only works on 440fx-based machines),
      and <node> also gets a sanity check to assure that the NUMA node
      specified for the pxb (if any - it's optional) actually exists on the
      guest.
      400b2976