1. 29 10月, 2014 2 次提交
  2. 06 10月, 2014 3 次提交
    • J
      qemu: Remove possible NULL deref in debug output · b7890a8c
      John Ferlan 提交于
      Check for !dev->info.alias was done after a VIR_DEBUG() statement
      that already tried to print - just flip sequence
      b7890a8c
    • J
      qemu: Remove need for virConnectPtr in hotunplug detach host, net · 99186c41
      John Ferlan 提交于
      Prior patch removed the need for the virConnectPtr in the unplug
      detach host path which caused ripple effect to remove in multiple
      callers.  The previous patch just left things as ATTRIBUTE_UNUSED -
      this patch will remove the variable.
      99186c41
    • J
      qemu: Fix hot unplug of SCSI_HOST device · d2774e54
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1141732
      
      Introduced by commit id '8f76ad99' the logic to detach a scsi_host
      device (SCSI or iSCSI) fails when attempting to remove the 'drive'
      because as I found in my investigation - the DelDevice takes care of
      that for us.
      
      The investigation turned up commits to adjust the logic for the
      qemuMonitorDelDevice and qemuMonitorDriveDel processing for interfaces
      (commit id '81f76598'), disk bus=VIRTIO,SCSI,USB (commit id '0635785b'),
      and chr devices (commit id '55b21f9b'), but nothing with the host devices.
      
      This commit uses the model for the previous set of changes and applies
      it to the hostdev path. The call to qemuDomainDetachHostSCSIDevice will
      return to qemuDomainDetachThisHostDevice handling either the audit of
      the failure or the wait for the removal and then call into
      qemuDomainRemoveHostDevice for the event, removal from the domain hostdev
      list, and audit of the removal similar to other paths.
      
      NOTE: For now the 'conn' param to +qemuDomainDetachHostSCSIDevice is left
      as ATTRIBUTE_UNUSED.  Removing requires a cascade of other changes to be
      left for a future patch.
      d2774e54
  3. 04 10月, 2014 1 次提交
    • M
      docs, conf, schema: add support for shmem device · 540a84ec
      Martin Kletzander 提交于
      This patch adds parsing/formatting code as well as documentation for
      shared memory devices.  This will currently be only accessible in QEMU
      using it's ivshmem device, but is designed as generic as possible to
      allow future expansion for other hypervisors.
      
      In the devices section in the domain XML users may specify:
      
      - For shmem device using a server:
      
       <shmem name='shmem0'>
         <server path='/tmp/socket-ivshmem0'/>
         <size unit='M'>32</size>
         <msi vectors='32' ioeventfd='on'/>
       </shmem>
      
      - For ivshmem device not using an ivshmem server:
      
       <shmem name='shmem1'>
         <size unit='M'>32</size>
       </shmem>
      
      Most of the configuration is made optional so it also allows
      specifications like:
      
       <shmem name='shmem1/>
       <shmem name='shmem2'>
         <server/>
       </shmem>
      Signed-off-by: NMaxime Leroy <maxime.leroy@6wind.com>
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      540a84ec
  4. 24 9月, 2014 1 次提交
    • P
      qemu: Report better errors from broken backing chains · 639a0098
      Peter Krempa 提交于
      Request erroring out from the backing chain traveller and drop qemu's
      internal backing chain integrity tester.
      
      The backing chain traveller reports errors by itself with possibly more
      detail than qemuDiskChainCheckBroken ever could.
      
      We also need to make sure that we reconnect to existing qemu instances
      even at the cost of losing the backing chain info (this really should be
      stored in the XML rather than reloaded from disk, but that needs some
      work).
      639a0098
  5. 04 9月, 2014 1 次提交
    • E
      maint: use consistent if-else braces in qemu · 44e30277
      Eric Blake 提交于
      I'm about to add a syntax check that enforces our documented
      HACKING style of always using matching {} on if-else statements.
      
      This commit focuses on the qemu driver.
      
      * src/qemu/qemu_command.c (qemuParseISCSIString)
      (qemuParseCommandLineDisk, qemuParseCommandLine)
      (qemuBuildSmpArgStr, qemuBuildCommandLine)
      (qemuParseCommandLineDisk, qemuParseCommandLineSmp): Correct use
      of {}.
      * src/qemu/qemu_capabilities.c (virQEMUCapsProbeCPUModels):
      Likewise.
      * src/qemu/qemu_driver.c (qemuDomainCoreDumpWithFormat)
      (qemuDomainRestoreFlags, qemuDomainGetInfo)
      (qemuDomainMergeBlkioDevice): Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise.
      * src/qemu/qemu_monitor_text.c (qemuMonitorTextCreateSnapshot)
      (qemuMonitorTextLoadSnapshot, qemuMonitorTextDeleteSnapshot):
      Likewise.
      * src/qemu/qemu_process.c (qemuProcessStop): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      44e30277
  6. 20 8月, 2014 8 次提交
    • M
      qemu: Label all TAP FDs · cf976d9d
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1095636
      
      When starting up the domain the domain's NICs are allocated. As of
      1f24f682 (v1.0.6) we are able to use multiqueue feature on virtio
      NICs. It breaks network processing into multiple queues which can be
      processed in parallel by different host CPUs. The queues are, however,
      created by opening /dev/net/tun several times. Unfortunately, only the
      first FD in the row is labelled so when turning the multiqueue feature
      on in the guest, qemu will get AVC denial. Make sure we label all the
      FDs needed.
      
      Moreover, the default label of /dev/net/tun doesn't allow
      attaching a queue:
      
          type=AVC msg=audit(1399622478.790:893): avc:  denied  { attach_queue }
          for  pid=7585 comm="qemu-kvm"
          scontext=system_u:system_r:svirt_t:s0:c638,c877
          tcontext=system_u:system_r:virtd_t:s0-s0:c0.c1023
          tclass=tun_socket
      
      And as suggested by SELinux maintainers, the tun FD should be labeled
      as svirt_t. Therefore, we don't need to adjust any range (as done
      previously by Guannan in ae368ebf) rather set the seclabel of the
      domain directly.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      cf976d9d
    • P
      qemu: hotplug: Sanitize shared device removal on media change · aecc6bb8
      Peter Krempa 提交于
      Instead of tediously copying of the disk source to remove it later
      ensure that the media change function removes the old device after it
      succeeds.
      aecc6bb8
    • P
      qemu: hotplug: Format proper source string for cdrom media change · b57ca132
      Peter Krempa 提交于
      Use the qemu source string formatter to format the source string
      correctly for remote and other storage instead of passing source->path
      blindly.
      b57ca132
    • P
      qemu: hotplug: Change arguments for qemuDomainChangeEjectableMedia · 1f39218e
      Peter Krempa 提交于
      Pass the source of the changed media instead of a complete disk
      definition.
      
      Note that the @disk argument now contains what @olddisk would contain.
      The new source is passed as a virStorageSource struct.
      1f39218e
    • P
      qemu: hotplug: Add helper to initialize/teardown new disks for VMs · ca91ba78
      Peter Krempa 提交于
      When we are changing media (or doing other hotplug operations) we need
      to setup cgroups, locking and seclabels on the new disk. This is a
      multi-step process where every piece can fail. To simplify dealing with
      this introduce qemuDomainPrepareDisk that similarly to
      qemuDomainPrepareDiskChainElement initializes/tears down  a whole new
      disk to be used with the domain.
      
      Additionally the function supports passing a different source struct for
      media changes of cdroms that will be refactored later.
      ca91ba78
    • P
      qemu: hotplug: Untangle cleanup paths in qemuDomainChangeEjectableMedia · 240eb2fb
      Peter Krempa 提交于
      Avoid the "audit" label to simplify control flow.
      240eb2fb
    • P
    • R
      storage: make disk source pool translation generic · 8c170c9f
      Roman Bogorodskiy 提交于
      Currently, qemu driver uses qemuTranslateDiskSourcePool()
      to translate disk volume information. This function is
      general enough and could be used for other drivers as well,
      so move it to conf/domain_conf.c along with its helpers.
      
       - qemuTranslateDiskSourcePool: move to storage/storage_driver.c
         and rename to virStorageTranslateDiskSourcePool,
       - qemuAddISCSIPoolSourceHost: move to storage/storage_driver.c
         and rename to virStorageAddISCSIPoolSourceHost,
       - qemuTranslateDiskSourcePoolAuth: move to storage/storage_driver.c
         and rename to virStorageTranslateDiskSourcePoolAuth,
       - Update users of qemuTranslateDiskSourcePool to use a
         new name.
      8c170c9f
  7. 14 8月, 2014 1 次提交
  8. 04 8月, 2014 1 次提交
    • J
      Don't overwrite errors from virNetDevBandwidthSet · 6dac5d06
      Ján Tomko 提交于
      Otherwise this beautiful error would be overwritten when
      the function is called with a really high rate number:
      
      2014-07-28 12:51:47.920+0000: 2304: error : virCommandWait:2399 :
      internal error: Child process (/sbin/tc class add dev vnet0 parent 1:
      classid 1:1 htb rate 4294968kbps) unexpected exit status 1: Illegal "rate"
      Usage: ... qdisc add ... htb [default N] [r2q N]
       default  minor id of class to which unclassified packets are sent {0}
       r2q      DRR quantums are computed as rate in Bps/r2q {10}
       debug    string of 16 numbers each 0-3 {0}
      
      ... class add ... htb rate R1 [burst B1] [mpu B] [overhead O]
                            [prio P] [slot S] [pslot PS]
                            [ceil R2] [cburst B2] [mtu MTU] [quantum Q]
       rate     rate allocated to this class (class can still borrow)
       burst    max bytes burst which can be accumulated during idle period {computed}
       mpu      minimum packet size used in rate computations
       overhead per-packet size overhead used in rate computations
       linklay  adapting to a linklayer e.g. atm
       ceil     definite upper class rate (no borrows) {rate}
       cburst   burst but for ceil {computed}
       mtu      max packet size we create rate map for {1600}
       prio     priority of leaf; lowe
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1043735
      6dac5d06
  9. 24 7月, 2014 6 次提交
  10. 07 7月, 2014 1 次提交
  11. 04 7月, 2014 1 次提交
  12. 03 7月, 2014 1 次提交
  13. 26 6月, 2014 1 次提交
  14. 25 6月, 2014 1 次提交
    • J
      qemu: enum cleanups in "src/qemu/*" · aa990efe
      Julio Faracco 提交于
      As we are doing with the enum structures, a cleanup in "src/qemu/"
      directory was done now. All the enums that were defined in the
      header files were converted to typedefs in this directory. This
      patch includes all the adjustments to remove conflicts when you do
      this kind of change. "Enum-to-typedef"'s conversions were made in
      "src/qemu/qemu_{capabilities, domain, migration, hotplug}.h".
      Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      aa990efe
  15. 21 6月, 2014 1 次提交
  16. 20 6月, 2014 1 次提交
  17. 13 6月, 2014 1 次提交
    • E
      blockcommit: update error messages related to block jobs · 278c51af
      Eric Blake 提交于
      A future patch will add two-phase block commit jobs; as the
      mechanism for managing them is similar to managing a block copy
      job, existing errors should be made generic enough to occur
      for either job type.
      
      * src/conf/domain_conf.c (virDomainHasDiskMirror): Update
      comment.
      * src/qemu/qemu_driver.c (qemuDomainDefineXML)
      (qemuDomainSnapshotCreateXML, qemuDomainRevertToSnapshot)
      (qemuDomainBlockJobImpl, qemuDomainBlockCopy): Update error
      message.
      * src/qemu/qemu_hotplug.c (qemuDomainDetachDiskDevice): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      278c51af
  18. 03 6月, 2014 6 次提交
  19. 02 6月, 2014 2 次提交