1. 10 11月, 2017 1 次提交
    • D
      vbox: Add support for 5.2.x · 0eda09f4
      Dawid Zamirski 提交于
      Simply add the 5.2 SDK header to the existing unified framework. No
      other special handling is needed as there's no API break between
      existing 5.1 and the just added 5.2.
      0eda09f4
  2. 04 11月, 2017 3 次提交
    • D
      vbox: Add more IStorageController API mappings · 06c4fd10
      Dawid Zamirski 提交于
      This patch exposes additional methods of the native VBOX API to the
      libvirt 'unified' vbox API to deal with IStorageController. The exposed
      methods are:
      
      * IStorageController->GetStorageControllerType()
      * IStorageController->SetStorageControllerType()
      * IMachine->GetStorageControllers()
      06c4fd10
    • D
      vbox: Close media when undefining domains · 7651debb
      Dawid Zamirski 提交于
      When registering a VM we call OpenMedium on each disk image which adds it
      to vbox's global media registry. Therefore, we should make sure to call
      Close when unregistering VM so we cleanup the media registry entries
      after ourselves - this does not remove disk image files. This follows
      the behaviour of the VBoxManage unregistervm command.
      7651debb
    • D
      vbox: Update ATTRIBUTE_UNUSED usage · 6f8ddbb8
      Dawid Zamirski 提交于
      Since the removal of VBOX <= 3x, the function arguments are actually
      used so they should not be marked with ATTRIBUTE_UNUSED anymore.
      6f8ddbb8
  3. 03 11月, 2017 1 次提交
    • A
      Remove backslash alignment attempts · 3e7db8d3
      Andrea Bolognani 提交于
      Right-aligning backslashes when defining macros or using complex
      commands in Makefiles looks cute, but as soon as any changes is
      required to the code you end up with either distractingly broken
      alignment or unnecessarily big diffs where most of the changes
      are just pushing all backslashes a few characters to one side.
      
      Generated using
      
        $ git grep -El '[[:blank:]][[:blank:]]\\$' | \
          grep -E '*\.([chx]|am|mk)$$' | \
          while read f; do \
            sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \
          done
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      3e7db8d3
  4. 26 10月, 2017 1 次提交
    • D
      vbox: Read runtime RDP port and handle autoport · 55223c2b
      Dawid Zamirski 提交于
      VirutalBox has a IVRDEServerInfo structure available that
      gives the effective runtime port that the VM is using when it's
      running. This is useful when the "TCP/Ports" VBox property was set to
      port range (e.g. via autoport = "yes" or via VBoxManage) in which
      case it would be impossible to get the "active" port otherwise.
      55223c2b
  5. 25 10月, 2017 2 次提交
    • D
      vbox: Make autoport set RDP port range. · 380815f8
      Dawid Zamirski 提交于
      Originally autoport in vbox driver was setting the port to default value
      (3389) which caused multiple VM instances use the same port. Since
      libvirt XML does not allow to set port ranges, this patch changes the
      "autoport" behavior to set VBox's "TCP/Ports" property to an arbitrary
      port range (3389-3689) to avoid that issue.
      380815f8
    • D
      vbox: Remove old unflexible macros · 32845fd6
      Dawid Zamirski 提交于
      The VBOX_SESSION_OPEN/CLOSE macros are only called in
      _vboxDomainSnapshotRestore and they are unflexible because:
      
      * assume the caller will have variable named "data"
      * can only create Write lock type
      
      As per above, it's not that hard to simply use the VBOX API directly.
      32845fd6
  6. 14 8月, 2017 1 次提交
  7. 11 1月, 2017 10 次提交
    • D
      vbox: consolidate vbox IID structures. · 73c6f16b
      Dawid Zamirski 提交于
      * remove _vboxIID_v2_x and _vboxIID_v3_x structs and repalce with one
        _vboxIID as all supprted vbox versions have the same IID structure.
      * remove vboxIIDUnion that was used to abstract version depended IID
        differences.
      * remove IID_MEMBER macro and use the new vboxIID directly.
      73c6f16b
    • D
      vbox: fix _displayTakeScreenShotPNGToArray · 36288917
      Dawid Zamirski 提交于
      This function was not implemented for vbox 5+ which removed
      TakeScreenShotPNGToArray but provides TakeScreenShotToArray with
      BitmapFormat_PNG argument which is the same thing.
      36288917
    • D
      vbox: IVRDxServer to IVRDEServer. · 5a5c6de3
      Dawid Zamirski 提交于
      The IVRDxServer was used because vbox < 4 used to have IVRDPServer
      whereas vbox >= 4 has IVRDEServer. Now that support for legacy
      versions is being removed, we can use IVRDEServer.
      5a5c6de3
    • D
      vbox: remove code dealing with oldMediumInterface · f2f70c21
      Dawid Zamirski 提交于
      * removed oldMediumInterface flag and related code that was used for
        vbox 2.x
      * remove accelerate2DVideo and networkRemoveInterface flags which were
        also conditionals for handling legacy vbox versions.
      f2f70c21
    • D
      vbox: remove domain events support. · 1d963578
      Dawid Zamirski 提交于
      this was implemented only for vbox 3 series and was mostly stubs
      anyway.
      1d963578
    • D
      vbox: remove getMachineForSession flag. · 374422ea
      Dawid Zamirski 提交于
      * the getMachineForSession is always true for 4.0+. This also means that
        checkflag argument in openSessionForMachine no longer has any meaning
        because it was or'ed with getMachineForSession (always true)
      * remove supportScreenshot flag - vbox 4.0+ supports it
      * remove detachDevicesExplicitly flag only relevant for < 4.0
      374422ea
    • D
      vbox: do not use IHardDisk anymore. · d7f369b5
      Dawid Zamirski 提交于
      VirtualBox 4.0+ uses IMedium and IHardDisk is no longer used, so
      
      * remove typef IMedium IHardDisk
      * merge UIHardDisk into UIMedium
      * update all references accordingly
      d7f369b5
    • D
      vbox: remove _vboxAttachDrivesOld · c7c286c6
      Dawid Zamirski 提交于
      and fold vboxAttachDrivesNew into vboxAttachDrives
      c7c286c6
    • D
      vbox: remove code for old API versions. · c8d7e90f
      Dawid Zamirski 提交于
      This removes most of the code wrapped in VBOX_API_VERSION < 4000000
      preprocessor checks. Those are the ones that can be safely removed
      without needing to update driver code to accomodate it.
      c8d7e90f
    • D
      vbox: remove SDK header files for vbox 3 and older. · 7f10ac33
      Dawid Zamirski 提交于
      * delete SDK header files for vbox older than 4.0
      * delete .c files for vbox older than 4.0
      * update vbox_XPCOMCGlue to use oldest supported header file, that is 4.0
        going forward.
      * remove deleted files from Makefile.am
      7f10ac33
  8. 02 12月, 2016 1 次提交
  9. 24 11月, 2016 2 次提交
    • D
      vbox: get rid of g_pVBoxGlobalData · 63586535
      Dawid Zamirski 提交于
      now that we have a new global vboxDriver object, remove the old
      vboxGlobalData struct and all references to it.
      63586535
    • D
      vbox: change how vbox API is initialized. · 04518c36
      Dawid Zamirski 提交于
      * add vboxDriver object to serve as a singleton global object that
        holds references to IVirtualBox and ISession to be shared among
        multiple connections. The vbox_driver is instantiated only once in
        the first call vboxGetDriverConnection function that is guarded by
        a mutex.
      
      * call vbox API initialize only when the first connection is
        established, and likewise uninitialize when last connection
        disconnects. The prevents each subsequent connection from overwriting
        IVirtualBox/ISession instances of any other active connection that
        led to libvirtd segfaults. The virConnectOpen and virConnectClose
        implementations are guarded by mutex on the global vbox_driver_lock
        where the global vbox_driver object counts connectios and decides
        when it's safe to call vbox's init/uninit routines.
      
      * add IVirutalBoxClient to vboxDriver and use it to in tandem with newer
        pfnClientInitialize/pfnClientUninitalize APIs for vbox versions that
        support it, to avoid usage of the old pfnComInitialize/Uninitialize.
      04518c36
  10. 08 11月, 2016 1 次提交
  11. 24 6月, 2016 1 次提交
  12. 08 3月, 2016 1 次提交
    • M
      _virtualboxCreateMachine: Avoid unbounded stack · 18f231e6
      Michal Privoznik 提交于
      If the stars are in the right position and you're building with
      VBox >= 4.2.0 it will happen that compiler thinks an array
      allocated on the stack may be unbounded:
      
      In file included from vbox/vbox_V4_2.c:13:0:
      vbox/vbox_tmpl.c: In function '_virtualboxCreateMachine':
      vbox/vbox_tmpl.c:2811:1: error: stack usage might be unbounded [-Werror=stack-usage=]
       _virtualboxCreateMachine(vboxGlobalData *data, virDomainDefPtr def, IMachine **machine, char *uuidstr ATTRIBUTE_UNUSED)
       ^
      
      Well, given how the variable is declared, I had some hard time
      seeing it is actually bounded. Surprisingly compiler does not
      complain because of -Wframe-larger-than. This is because
      variable length arrays do not count into that warning.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      18f231e6
  13. 03 3月, 2016 1 次提交
    • M
      Initialize couple of variables. · bde6e002
      Michal Privoznik 提交于
      While trying to build with -Os couple of compile errors showed
      up.
      
      conf/domain_conf.c: In function 'virDomainChrRemove':
      conf/domain_conf.c:13666:24: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
           virDomainChrDefPtr ret, **arrPtr = NULL;
                              ^
      Compiler fails to see that @ret is used only if set in the loop,
      but whatever, there's no harm in initializing the variable.
      
      In vboxAttachDrivesNew and _vboxAttachDrivesOld compiler thinks
      that @rc may be used uninitialized. Well, not directly, but maybe
      after some optimization. Yet again, no harm in initializing a
      variable.
      
      In file included from ./util/virthread.h:26:0,
                       from ./datatypes.h:28,
                       from vbox/vbox_tmpl.c:43,
                       from vbox/vbox_V3_1.c:37:
      vbox/vbox_tmpl.c: In function '_vboxAttachDrivesOld':
      ./util/virerror.h:181:5: error: 'rc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
           virReportErrorHelper(VIR_FROM_THIS, code, __FILE__,              \
           ^
      In file included from vbox/vbox_V3_1.c:37:0:
      vbox/vbox_tmpl.c:1041:14: note: 'rc' was declared here
           nsresult rc;
                    ^
      Yet again, one uninitialized variable:
      
      qemu/qemu_driver.c: In function 'qemuDomainBlockCommit':
      qemu/qemu_driver.c:17194:9: error: 'baseSource' may be used uninitialized in this function [-Werror=maybe-uninitialized]
               qemuDomainPrepareDiskChainElement(driver, vm, baseSource,
               ^
      
      And another one:
      
      storage/storage_backend_logical.c: In function 'virStorageBackendLogicalMatchPoolSource.isra.2':
      storage/storage_backend_logical.c:618:33: error: 'thisSource' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                             thisSource->devices[j].path))
                                       ^
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      bde6e002
  14. 11 2月, 2016 4 次提交
  15. 15 5月, 2015 1 次提交
  16. 08 4月, 2015 1 次提交
  17. 19 11月, 2014 1 次提交
  18. 15 11月, 2014 1 次提交
  19. 29 10月, 2014 6 次提交