1. 25 5月, 2016 17 次提交
    • S
    • J
      lxc: Fix lxcDomainDestroyFlags endjob processing · cb0159df
      John Ferlan 提交于
      Commit id '15ccb0db' added job functions for the lxc driver; however,
      for shutdown and nonpersistent path, the vm was removed from the domain
      object list and the vm pointer cleared before the endjob.
      
      Adjust the code to perform the endjob first and then perform the
      ObjListRemove as long as the vm wasn't NULL. This follows more closely
      models from qemu and libxl
      
      Found by Coverity (FORWARD_NULL)
      cb0159df
    • J
      qemu: Remove unused persistentAddrs · fb063500
      John Ferlan 提交于
      Based on some digital archaeology performed by jtomko, it's been determined
      that the persistentAddrs variable is no longer necessary...
      
      The variable was added by:
      commit 141dea6b
      CommitDate: 2010-02-12 17:25:52 +0000
          Add persistence of PCI addresses to QEMU
      
      Where it was set to 0 on domain startup if qemu did not support the
      QEMUD_CMD_FLAG_DEVICE capability, to clear the addresses at shutdown,
      because QEMU might make up different ones next time.
      
      As of commit f5dd58a6
      CommitDate: 2012-07-11 11:19:05 +0200
          qemu: Extended qemuDomainAssignAddresses to be callable from
          everywhere.
      
      this was broken, when the persistentAddrs = 0 assignment was moved
      inside qemuDomainAssignPCIAddresses and while it pretends to check
      for !QEMU_CAPS_DEVICE, its parent qemuDomainAssignAddresses is only
      called if QEMU_CAPS_DEVICE is present.
      fb063500
    • J
      qemu: Remove dead code · f30672d5
      John Ferlan 提交于
      Since commit id '20a0fa8e' removed the QEMU_CAPS_DEVICE, Coverity notes
      that it's no longer possible to have 'addrs' be NULL when checking for
      a live domain since qemuDomainPCIAddressSetCreate would have jumped to
      cleanup if addrs was NULL.
      f30672d5
    • A
      conf: nodedev: Set PCI_PHYSICAL_FUNCTION flag more carefully · 54f325e9
      Andrea Bolognani 提交于
      Instead of setting the flag before parsing the PCI address, set
      it afterwards. This ensure we can never end up in a situation
      where the flag has been set but pci_dev.physical_function has
      not been filled in.
      54f325e9
    • A
      pci: Fix virPCIGetPhysicalFunction()'s callers · fc9ba9d5
      Andrea Bolognani 提交于
      Commit c8b1a836 changed the function, making it
      impossible for callers to be able to tell whether a
      non-negative return value means "physical function
      address found and parsed correctly" or "couldn't find
      corresponding physical function".
      
      The important difference between the two being that,
      in the latter case, the returned pointer is NULL and
      should never, ever be dereferenced.
      
      In order to cope with these changes, the callers
      have to be updated.
      fc9ba9d5
    • A
      pci: Document virPCIGetPhysicalFunction() · 063da393
      Andrea Bolognani 提交于
      063da393
    • A
      pci: Initialize return location in virPCIGetPhysicalFunction() · 12b28f1b
      Andrea Bolognani 提交于
      Just an extra precaution in case the function returns early
      due to an OOM error.
      12b28f1b
    • P
      qemu: hotplug: wait for the tray to eject only for drives with a tray · 72a7ff6b
      Peter Krempa 提交于
      Use the detected tray presence flag to trigger the tray waiting code
      only if the given storage device in qemu reports to have a tray.
      
      This is necessary as the floppy device lost it's tray as of qemu commit:
      
      commit abb3e55b5b718d6392441f56ba0729a62105ac56
      Author: Max Reitz <mreitz@redhat.com>
      Date:   Fri Jan 29 20:49:12 2016 +0100
      
          Revert "hw/block/fdc: Implement tray status"
      72a7ff6b
    • P
      qemu: hotplug: Fix error reported when cdrom tray is locked · 2e75da42
      Peter Krempa 提交于
      Commit 1fad65d4 used a really big hammer
      and overwrote the error message that might be reported by qemu if the
      tray is locked. Fix it by reporting the error only if no error is
      currently set.
      
      Error after commit mentioned above:
      error: internal error: timed out waiting for disk tray status update
      
      New error:
      error: internal error: unable to execute QEMU command 'eject': Tray of
      device 'drive-ide0-0-0' is not open
      2e75da42
    • P
      qemu: hotplug: Extract code for waiting for tray eject · 0aa19f35
      Peter Krempa 提交于
      The code grew rather convoluted. Extract it to a separate function.
      0aa19f35
    • P
      qemu: process: Fix and improve disk data extraction · 894dc85f
      Peter Krempa 提交于
      Extract information for all disks and update tray state and source only
      for removable drives. Additionally store whether a drive is removable
      and whether it has a tray.
      894dc85f
    • P
      qemu: Move and rename qemuDomainCheckEjectableMedia to qemuProcessRefreshDisks · d9bee413
      Peter Krempa 提交于
      Move it to a more sane place since it's refreshing data about disks.
      d9bee413
    • P
      qemu: Extract more information about qemu drives · f1690dc3
      Peter Krempa 提交于
      Extract whether a given drive has a tray and whether there is no image
      inserted.
      
      Negative logic for the image insertion is chosen so that the flag is set
      only if we are certain of the fact.
      f1690dc3
    • P
      5f963d89
    • J
      xenconfig: xm: check for driver on disk format · 293668cd
      Joao Martins 提交于
      When reviewing libxl vif typename series[0] I found a bug
      on xen-xm formatter where "virsh domxml-to-native xen-xm file.xml"
      can lead to a NULL dereference if the disk driver isn't specified.
      Fix this by checking for driver before writing/testing it down.
      
      [0] https://www.redhat.com/archives/libvir-list/2016-April/msg01434.htmlSigned-off-by: NJoao Martins <joao.m.martins@oracle.com>
      293668cd
    • L
      lxc: support <interface type='ethernet'> · 002b7704
      Laine Stump 提交于
      This is identical to type='bridge', but without the "connect to a
      bridge" part, so it can be handled by using the same functions (and
      often even the same cases in switch statements), after renaming
      virLXCProcessSetupInterfaceBridged() to virLXCProcessInterfaceTap()
      and enhancing it to skip bridge-related items when brname == NULL.
      
      To be truly useful, we need to support setting the ip address on the
      host side veth as well as guest side veth (already supported for
      type='bridge'), as well as setting the peer address for both.
      
      The <script> element (supported by type='ethernet' in qemu) isn't
      supported in this patch. An error is logged at domain start time if it
      is encountered. This may be changed in a later patch.
      002b7704
  2. 24 5月, 2016 21 次提交
  3. 23 5月, 2016 2 次提交