1. 07 7月, 2016 1 次提交
  2. 02 7月, 2016 4 次提交
    • L
      qemu: support setting host-side IP addresses/routes · fe8567f6
      Laine Stump 提交于
      For type='ethernet' interfaces only.
      
      (This patch had been pushed earlier in
      commit 0b4645a7, but was reverted in
      commit 84d47a3c because it had been
      accidentally pushed during the freeze for release 2.0.0)
      fe8567f6
    • J
      encryption: Add <cipher> and <ivgen> to encryption · 2552fec2
      John Ferlan 提交于
      For a luks device, allow the configuration of a specific cipher to be
      used for encrypting the volume.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      2552fec2
    • J
      encryption: Add luks parsing for storageencryption · 9bbf0d7e
      John Ferlan 提交于
      Add parse and format of the luks/passphrase secret including tests for
      volume XML parsing.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      9bbf0d7e
    • J
      util: Add 'usage' for encryption · 47e88b33
      John Ferlan 提交于
      In order to use more common code and set up for a future type, modify the
      encryption secret to allow the "usage" attribute or the "uuid" attribute
      to define the secret. The "usage" in the case of a volume secret would be
      the path to the volume as dictated by the backwards compatibility brought
      on by virStorageGenerateQcowEncryption where it set up the usage field as
      the vol->target.path and didn't allow someone to provide it. This carries
      into virSecretObjListFindByUsageLocked which takes the secret usage attribute
      value from from the domain disk definition and compares it against the
      usage type from the secret definition. Since none of the code dealing
      with qcow/qcow2 encryption secrets uses usage for lookup, it's a mostly
      cosmetic change. The real usage comes in a future path where the encryption
      is expanded to be a luks volume and the secret will allow definition of
      the usage field.
      
      This code will make use of the virSecretLookup{Parse|Format}Secret common code.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      47e88b33
  3. 01 7月, 2016 2 次提交
  4. 30 6月, 2016 1 次提交
  5. 27 6月, 2016 2 次提交
  6. 23 6月, 2016 2 次提交
  7. 22 6月, 2016 2 次提交
  8. 20 6月, 2016 1 次提交
    • A
      qemu: Don't use legacy USB for aarch64 mach-virt guests · dc5821d7
      Andrea Bolognani 提交于
      The '-usb' option doesn't have any effect for aarch64 mach-virt
      guests, so the fact that it's currently enabled by default is not
      really causing any issue.
      
      However, that might change in the future (although unlikely), and
      having it as part of the QEMU command line can cause confusion to
      someone looking through the process list.
      
      Avoid it completely, like it's already happening for q35.
      dc5821d7
  9. 18 6月, 2016 1 次提交
    • A
      qemu: Permit PCI-free aarch64 mach-virt guests · 86a68bdb
      Andrea Bolognani 提交于
      There has been some progress lately in enabling virtio-pci on
      aarch64 guests; however, guest OS support is still spotty at best,
      so most guests are going to be using virtio-mmio instead.
      
      Currently, mach-virt guests are closely modeled after q35 guests,
      and that includes always adding a dmi-to-pci-bridge that's just
      impossible to get rid of. While that's acceptable (if suboptimal)
      for q35, where you will always need some kind of PCI device anyway,
      mach-virt guests should be allowed to avoid it.
      86a68bdb
  10. 17 6月, 2016 1 次提交
    • L
      qemu: don't add pci-bridge to Q35/arm domains unless it's needed · d5fb8f45
      Laine Stump 提交于
      Until now, a Q35 domain (or arm/virt, or any other domain that has a
      pcie-root bus) would always have a pci-bridge added, so that there
      would be a hotpluggable standard PCI slot available to plug in any PCI
      devices that might be added. This patch removes the explicit add,
      instead relying on the pci-bridge being auto-added during PCI address
      assignment (it will add a pci-bridge if there are no free slots).
      
      This doesn't eliminate the dmi-to-pci-bridge controller that is
      explicitly added whether or not a standard PCI slot is required (and
      that is almost never used as anything other than a converter between
      pcie.0's PCIe slots and standard PCI). That will be done separately.
      d5fb8f45
  11. 14 6月, 2016 2 次提交
  12. 09 6月, 2016 6 次提交
  13. 07 6月, 2016 1 次提交
  14. 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
  15. 25 5月, 2016 2 次提交
  16. 23 5月, 2016 3 次提交
  17. 21 5月, 2016 2 次提交
    • C
      tests: qemu: test <address type='pci'/> with aarch64 · f3d5e255
      Cole Robinson 提交于
      This is an interesting test case since PCI isn't the default for
      aarch64.
      f3d5e255
    • 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
  18. 20 5月, 2016 5 次提交
    • 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
      qemu_command: move sasl parameter after port and addr definition · 858d7b6c
      Pavel Hrdina 提交于
      This is required for following patches where new listen types will be
      introduced.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      858d7b6c
    • 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
      cpu_x86: Use array of features in CPU map · 3a7cd180
      Jiri Denemark 提交于
      There's no reason for keeping the features in a linked list. Especially
      when we know upfront the total number of features we are loading.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      3a7cd180
    • J
      Remove DISK_BUS_XEN support from qemuBuildDiskDriveCommandLine · 936b8652
      Ján Tomko 提交于
      We have stopped supporting Xenner some time ago.
      936b8652
  19. 18 5月, 2016 1 次提交
    • 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