1. 06 5月, 2016 5 次提交
  2. 05 5月, 2016 2 次提交
  3. 04 5月, 2016 3 次提交
    • J
      qemu: Add 'iothread' to command line for supported controller · d0b58459
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1286709
      
      Now that we have all the pieces in place, we can add the 'iothread=#' to
      the command line for the (two) controllers that support it (virtio-scsi-pci
      and virtio-scsi-ccw). Add the tests as well...
      d0b58459
    • J
      qemu: Use switch for qemuCheckIOThreads · ade5dae2
      John Ferlan 提交于
      Rather than an if statement, use a switch.
      
      The switch will also catch the illegal usage of 'iothread' with some other
      kind of unsupported bus configuration.
      ade5dae2
    • J
      qemu: Add capability for virtio-scsi iothreads · e2faa976
      John Ferlan 提交于
      An iothread for virtio-scsi is a property of the controller. Add a lookup
      of the 'virtio-scsi-pci' and 'virtio-scsi-ccw' device properties and parse
      the output.  For both, support for the iothread was added in qemu 2.4
      while support for virtio-scsi in general was added in qemu 1.4.
      
      Modify the various mock capabilities replies (by hand) to reflect the
      when virtio-scsi was supported and then specifically when the iothread
      property was added. For versions prior to 1.4, use the no device error
      return for virtio-scsi. For versions 1.4 to before 2.4, add some data
      for virtio-scsi-pci even though it isn't complete we're not looking for
      anything specific there anyway. For 2.4 to 2.6, add a more complete reply.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      e2faa976
  4. 03 5月, 2016 15 次提交
  5. 02 5月, 2016 15 次提交
    • B
      qemu: add default panic device to S390 guests · 73e4e10e
      Boris Fiuczynski 提交于
      This patch adds by default a panic device with model s390 to S390 guests.
      Signed-off-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
      73e4e10e
    • B
      qemu: add panic device support for S390 · d8554654
      Boris Fiuczynski 提交于
      If a panic device is being defined without a model in a domain
      the default value is always overwritten with model ISA. An ISA
      bus does not exist on S390 and therefore specifying a panic device
      results in an unsupported configuration.
      Since the S390 architecture inherently provides a crash detection
      capability the panic device should be defined in the domain xml.
      
      This patch adds an s390 panic device model and prevents setting a
      device address on it.
      Signed-off-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
      Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      d8554654
    • B
    • B
      qemu: fix error message for default panic device · a1574e5c
      Boris Fiuczynski 提交于
      Adding the default bus type ISA to the message.
      Signed-off-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
      a1574e5c
    • S
      send default USB controller in xml to destination during migration · 192a53e0
      Shivaprasad G Bhat 提交于
      The default USB controller is not sent to destination as the older versions
      of libvirt(0.9.4 or earlier as I see in commit log of 409b5f54) didn't
      support them. For some archs where the support started much later can
      safely send the USB controllers without this worry. So, send the controller
      to destination for all archs except x86. Moreover this is not very applicable
      to x86 as the USB controller has model ich9_ehci1 on q35 and for pc-i440fx,
      there cant be any slots before USB as it is fixed on slot 1.
      
      The patch fixes a bug that, if the USB controller happens to occupy
      a slot after disks/interfaces and one of them is hot-unplugged, then
      the default USB controller added on destination takes the smallest slot
      number and that would lead to savestate mismatch and migration
      failure. Seen and verified on PPC64.
      Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
      192a53e0
    • M
      Change virDevicePCIAddress to virPCIDeviceAddress · c36b1f7b
      Martin Kletzander 提交于
      We had both and the only difference was that the latter also included
      information about multifunction setting.  The problem with that was that
      we couldn't use functions made for only one of the structs (e.g.
      parsing).  To consolidate those two structs, use the one in virpci.h,
      include that in domain_conf.h and add the multifunction member in it.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      c36b1f7b
    • J
      qemu: hotplug: Fix possible memory leak of props · 573cfd18
      John Ferlan 提交于
      If we failed to build the aliases or attach the chardev, then the props
      would be leaked - fix that.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      573cfd18
    • J
      qemu: hotplug: Adjust error path for attach hostdev scsi disk · 3e81b98c
      John Ferlan 提交于
      Adjust error path logic to make it clearer how to undo the failed add.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      3e81b98c
    • J
      qemu: hotplug: Adjust error path for attach virtio disk · 843ae778
      John Ferlan 提交于
      Adjust error path logic to make it clearer how to undo the failed add.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      843ae778
    • J
      qemu: hotplug: Adjust error path for attach scsi disk · b0e002fc
      John Ferlan 提交于
      Adjust error path logic to make it clearer how to undo the failed add.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      b0e002fc
    • J
      qemu: Use qemuDomainSecretInfoPtr in qemuBuildNetworkDriveURI · db5b47fd
      John Ferlan 提交于
      Rather than take username and password as parameters, now take
      a qemuDomainSecretInfoPtr and decode within the function.
      
      NB: Having secinfo implies having the username for a plain type
          from a successful virSecretGetSecretString
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      db5b47fd
    • J
      qemu: Introduce qemuDomainSecretHostdevPrepare and Destroy · d0816650
      John Ferlan 提交于
      Similar to the qemuDomainSecretDiskPrepare, generate the secret
      for the Hostdev's prior to call qemuProcessLaunch which calls
      qemuBuildCommandLine. Additionally, since the secret is not longer
      added as part of building the command, the hotplug code will need
      to make the call to add the secret in the hostdevPriv.
      
      Since this then is the last requirement to pass a virConnectPtr
      to qemuBuildCommandLine, we now can remove that as part of these
      changes. That removal has cascading effects through various callers.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      d0816650
    • J
      qemu: Introduce qemuDomainHostdevPrivatePtr · 27726d8c
      John Ferlan 提交于
      Modeled after the qemuDomainDiskPrivatePtr logic, create a privateData
      pointer in the _virDomainHostdevDef to allow storage of private data
      for a hypervisor in order to at least temporarily store auth/secrets
      data for usage during qemuBuildCommandLine.
      
      NB: Since the qemu_parse_command (qemuParseCommandLine) code is not
      expecting to restore the auth/secret data, there's no need to add
      code to handle this new structure there.
      
      Updated copyrights for modules touched. Some didn't have updates in a
      couple years even though changes have been made.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      27726d8c
    • J
      qemu: Introduce qemuDomainSecretPrepare and Destroy · 40d8e2ba
      John Ferlan 提交于
      Rather than needing to pass the conn parameter to various command
      line building API's, add qemuDomainSecretPrepare just prior to the
      qemuProcessLaunch which calls qemuBuilCommandLine. The function
      must be called after qemuProcessPrepareHost since it's expected
      to eventually need the domain masterKey generated during the prepare
      host call. Additionally, future patches may require device aliases
      (assigned during the prepare domain call) in order to associate
      the secret objects.
      
      The qemuDomainSecretDestroy is called after the qemuProcessLaunch
      finishes in order to clear and free memory used by the secrets
      that were recently prepared, so they are not kept around in memory
      too long.
      
      Placing the setup here is beneficial for future patches which will
      need the domain masterKey in order to generate an encrypted secret
      along with an initialization vector to be saved and passed (since
      the masterKey shouldn't be passed around).
      
      Finally, since the secret is not added during command line build,
      the hotplug code will need to get the secret into the private disk data.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      40d8e2ba
    • J
      qemu: Introduce qemuDomainSecretInfo · 48f56a9c
      John Ferlan 提交于
      Introduce a new private structure to hold qemu domain auth/secret data.
      This will be stored in the qemuDomainDiskPrivate as a means to store the
      auth and fetched secret data rather than generating during building of
      the command line.
      
      The initial changes will handle the current username and secret values
      for rbd and iscsi disks (in their various forms). The rbd secret is
      stored as a base64 encoded value, while the iscsi secret is stored as
      a plain text value. Future changes will store encoded/encrypted secret
      data as well as an initialization vector needed to be given to qemu
      in order to decrypt the encoded password along with the domain masterKey.
      The inital assumption will be that VIR_DOMAIN_SECRET_INFO_PLAIN is
      being used.
      
      Although it's expected that the cleanup of the secret data will be
      done immediately after command line generation, reintroduce the object
      dispose function qemuDomainDiskPrivateDispose to handle removing
      memory associated with the structure for "normal" cleanup paths.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      48f56a9c