1. 26 2月, 2013 1 次提交
  2. 25 2月, 2013 2 次提交
    • P
      qemu: Implement support for EGD backend for virtio-rng · 820019fc
      Peter Krempa 提交于
      This patch adds a new capability bit QEMU_CAPS_OBJECT_RNG_EGD and code
      to support the egd backend for the VirtIO RNG device.
      
      The device is added by 3 qemu command line options:
      -chardev socket,id=charrng0,host=1.2.3.4,port=1234 (communication
                                                          backend)
      -object rng-egd,chardev=charrng0,id=rng0 (RNG protocol client)
      -device virtio-rng-pci,rng=rng0,bus=pci.0,addr=0x4 (the RNG device)
      820019fc
    • P
      qemu: Implement support for default 'random' backend for virtio-rng · 234a5560
      Peter Krempa 提交于
      This patch implements support for the virtio-rng-pci device and the
      rng-random backend in qemu.
      
      Two capabilities bits are added to track support for those:
      
      QEMU_CAPS_DEVICE_VIRTIO_RNG - for the device support and
      QEMU_CAPS_OBJECT_RNG_RANDOM - for the backend support.
      
      qemu is invoked with these additional parameters if the device is
      enabled:
      
      -object rng-random,id=rng0,filename=/test/phile (to add the backend)
      -device virtio-rng-pci,rng=rng0,bus=pci.0,addr=0x4 (to add the device)
      234a5560
  3. 23 2月, 2013 13 次提交
  4. 22 2月, 2013 1 次提交
  5. 21 2月, 2013 13 次提交
  6. 20 2月, 2013 3 次提交
    • J
      qemu: Do not ignore mandatory features in migration cookie · 69660042
      Jiri Denemark 提交于
      Due to "feature"/"features" nasty typo, any features marked as mandatory
      by one side of a migration are silently considered optional by the other
      side. The following is the code that formats mandatory features in
      migration cookie:
      
          for (i = 0 ; i < QEMU_MIGRATION_COOKIE_FLAG_LAST ; i++) {
              if (mig->flagsMandatory & (1 << i))
                  virBufferAsprintf(buf, "  <feature name='%s'/>\n",
                                    qemuMigrationCookieFlagTypeToString(i));
          }
      69660042
    • J
      qemu: switch PCI address alocation to use virDevicePCIAddress · bc28e56b
      Ján Tomko 提交于
      Some functions were using virDomainDeviceInfo where virDevicePCIAddress
      would suffice. Some were only using integers for slots and functions,
      assuming the bus numbers are always 0.
      
      Switch from virDomainDeviceInfoPtr to virDevicePCIAddressPtr:
      qemuPCIAddressAsString
      qemuDomainPCIAddressCheckSlot
      qemuDomainPCIAddressReserveAddr
      qemuDomainPCIAddressReleaseAddr
      
      Switch from int slot to virDevicePCIAddressPtr:
      qemuDomainPCIAddressReserveSlot
      qemuDomainPCIAddressReleaseSlot
      qemuDomainPCIAddressGetNextSlot
      
      Deleted functions (they would take the same parameters
      as ReserveAddr/ReleaseAddr do now.)
      qemuDomainPCIAddressReserveFunction
      qemuDomainPCIAddressReleaseFunction
      bc28e56b
    • J
      qemu: Use atomic ops for driver->nactive · 5d6f6367
      Jiri Denemark 提交于
      5d6f6367
  7. 19 2月, 2013 2 次提交
  8. 14 2月, 2013 2 次提交
    • L
      qemu: let virCommand set child process security labels/uid/gid · 0345c728
      Laine Stump 提交于
      The qemu driver had been calling virSecurityManagerSetProcessLabel()
      from a "pre-exec hook" function that is run after the child is forked,
      but before exec'ing qemu. This is problematic because the uid and gid
      of the child are set by the security driver, but capabilities are
      dropped by virCommand - such separation doesn't work; the two
      operations must be done together or the capabilities do not transfer
      properly to the child process.
      
      This patch switches to using virSecurityManagerSetChildProcessLabel(),
      which is called prior to virCommandRun() (rather than being called
      *during* virCommandrun() by the hook function), and doesn't set the
      UID/GID/security label directly, but instead merely informs virCommand
      what it should set them all to when the time is appropriate.
      
      This lets virCommand choose to do the uid/gid and caps dropping all at
      the same time if it wants (it does *want* to, but isn't doing so yet;
      that's for an upcoming patch).
      0345c728
    • L
      qemu: replace exec hook with virCommandSetUID/GID in qemuCaps* · 6a8ecc37
      Laine Stump 提交于
      Setting the uid/gid of the child process was the only thing done by
      the hook function in this case, and that can now be done more simply
      with virCommandSetUID/GID.
      6a8ecc37
  9. 13 2月, 2013 1 次提交
    • D
      Remove qemuDriverLock from almost everywhere · a9e97e0c
      Daniel P. Berrange 提交于
      With the majority of fields in the virQEMUDriverPtr struct
      now immutable or self-locking, there is no need for practically
      any methods to be using the QEMU driver lock. Only a handful
      of helper APIs in qemu_conf.c now need it
      a9e97e0c
  10. 12 2月, 2013 1 次提交
    • D
      Fix potential deadlock across fork() in QEMU driver · 61b52d2e
      Daniel P. Berrange 提交于
      The hook scripts used by virCommand must be careful wrt
      accessing any mutexes that may have been held by other
      threads in the parent process. With the recent refactoring
      there are 2 potential flaws lurking, which will become real
      deadlock bugs once the global QEMU driver lock is removed.
      
      Remove use of the QEMU driver lock from the hook function
      by passing in the 'virQEMUDriverConfigPtr' instance directly.
      
      Add functions to the virSecurityManager to be invoked before
      and after fork, to ensure the mutex is held by the current
      thread. This allows it to be safely used in the hook script
      in the child process.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      61b52d2e
  11. 11 2月, 2013 1 次提交